0

My SFDC org has been integrated with MDM via Oracle SOA. Lately we are seeing issues where data going from value to nulls.

When MDM does not have a value in a field then they are not publishing XML with that respective field information. Now when SOA is performing upsert operation with SFDC, then the values are not going from blank to null.

Is there a robust mechanism to handle such scenario's of a field's value going to null.

Any help is greatly appreciated.

Thanks!!!

  • Please explain it more! If value is blank or null in MDM what should happen ? – ashishcloud Jun 9 '15 at 5:45
1

In order to set Salesforce fields to NULL (via API), a specific mechanism is to be used.

Salesforce expects API request to contain a "fieldstonull" block containing all fields, which are expected to be set as NULL.

for e.g. following request would set field "CustomerNumber__c" on Contact to NULL:-

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:sessionId>...</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:update>
         <!--Zero or more repetitions:-->
         <urn:sObjects xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Contact">
               <urn:Id>001000000000a45</urn:Id>
               <urn:fieldsToNull>CustomerNumber__c</urn:fieldsToNull>
         </urn:sObjects>
      </urn:update>
   </soapenv:Body>
</soapenv:Envelope>

For more details please refer:-

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm

http://blog.deadlypenguin.com/blog/2012/08/26/nulling-fields-in-salesforce-with-soapui/

| improve this answer | |

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.