REST API example in Salesforce
Salesforce provides REST API to Create, Update and Delete records. We can also define Apex as a REST Service to Create, Update and Delete records in Salesforce. Example: Follow the ....
Salesforce provides REST API to Create, Update and Delete records. We can also define Apex as a REST Service to Create, Update and Delete records in Salesforce. Example: Follow the ....
Example: Apex Class: global class web{ Webservice static String fetch(Id localId) { return localId; }} Custom Button Javascript: {!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")}{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")}var r = confirm("Are you sure want to fetch?");if(r == true){ var ....
When you want to access the external sites in your Salesforce application using callouts, webservices, etc... You need to add that in the Remote Site Settings. This is just a ....
Exception: Callout not allowed from this future method. Resolution: Please enable callout by annotating the future method with callout=true. Example: @future(callout=true) Sample Code: @future(callout=true) public static void post(String u, String ....
Content-Length should be mentioned to avoid this error in callouts. Sample Code: HttpRequest request = new HttpRequest(); request.setHeader( 'Content-Length', '512' ); Use GET method instead of POST method. So that, ....
Kindly visit the below link for Apex Web Services and Callouts http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts
To use external WSDL in Salesforce, kindly follow the below steps 1. Go to Setup --> App Setup --> Develop --> Apex Classes. 2. Click "Generate from WSDL" button. 3. ....
To empty recycle bin data in Salesforce using external application, emptyRecycleBin () method is used. emptyRecycleBin () Delete records from the recycle bin immediately. The recycle bin lets you view ....
To upsert data in Salesforce using external application, upsert () method is used. upsert() Creates new records and updates existing records; uses a custom field to determine the presence of ....
To update data in Salesforce using external application, update () method is used. update () Update one or more existing records in your organization’s data. Use this call to update ....