Posts

Showing posts from March, 2019

Creating Web-services in Salesforce

Image
Salesforce : Calling from another Salesforce System Recently I had a requirement where one of my client wanted to interact with their Salesforce org to insert some information in their org from another salesforce, and they wanted it through web-services. This post will cover what I have learned in regards to web-services with this requirement and what steps I had taken for this. Target Org : SetUp Creating Web Services in Force.com is as simple as creating an Apex class. Here is an Example: global class WebServiceContact { webservice static string createContact(String contactLastName) { try { Contact c = new Contact(lastName = contactLastName); insert c; return c.id; }catch(System.Exception e) { System.debug('Callout error: '+ e); return 'Server Error...'; } } } Generate and Download WSDLs with below steps To get your org-specific WSDLs see below Steps. 1. Go to A