1

This question is more of a high level. An external system is trying to connect with my Salesforce app. The external system- ABC, is using the partner wsdl to update the record on Salesforce. ABC has the id of the record and field api name that needs to be updated. I see an operation named Update in partner WSDL and assume that ABC can call this operation to update the record.

How would ABC know to update a particular field of the record using the update operation? If I have added new field to Salesforce should I provide the partnerWSDL again to the end system? I think No.

3

Partner WSDL is loosely coupled so you do not need to provide the WSDL again .

However the third party code would still use string identifier for the field names that needs to be updated .So you will pass the name of the field that's newly created and third party code would incorporate it .

Here is a simple Java code that shows how the update call will be done

public void updateSample(String id) {
try {
  // Create an sObject of type contact
  SObject updateContact = new SObject();
  updateContact.setType("Contact");

  // Set the ID of the contact to update
  updateContact.setId(id);
  // Set the new field with a new value
  updateContact.setField("newField__c", "xyz");

  // Create another contact that will cause an error
  // because it has an invalid ID.
   SObject errorContact = new SObject();
   errorContact.setType("Contact");
  }catch(){

  }
}

For more detail examples check the guide

4
  • Thanks. If ABC wants to update a field name would they just call the update operation? What all should the pass as part of the request? Any example is appreciated. Thanks!
    – SfdcBat
    Dec 29 '16 at 16:19
  • provided a java example Dec 29 '16 at 16:24
  • Do we have to let the ABC system know all the field api name that they should update or they can get that information from the partner WSDL?
    – SfdcBat
    Dec 29 '16 at 17:34
  • 1
    They can get through describe API call but it's best to give the names as you would save a call Dec 29 '16 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.