1

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!!!

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

1 Answer 1

2

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/

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .