Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Jaymin kansara
    Update Custom Object record
    Topic posted June 9, 2019 by Jaymin kansaraGreen Ribbon: 100+ Points, tagged SOAP 
    59 Views, 1 Comment
    Title:
    Update Custom Object record
    Content:

    Hello,

    We need to update the record of custom object from Ebs to Service cloud using SOAP API. We have already created the SOAP API to update the record of custom object, please find the code snippet here below:

    <soapenv:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Update xmlns="urn:messages.ws.rightnow.com/v1_4">
     
    <RNObjects xmlns:q1="urn:generic.ws.rightnow.com/v1_4" xsi:type="q1:GenericObject">
                     <ID xmlns="urn:base.ws.rightnow.com/v1_4" id="16916" />
                         <q1:ObjectType>
                            <q1:Namespace>CO</q1:Namespace>
                            <q1:TypeName>AssetMapping</q1:TypeName>
                         </q1:ObjectType>
    <q1:GenericFields name="Handover_Status">
    <q1:DataValue>
    <q1:NamedIDValue>
    <ID xmlns="urn:base.ws.rightnow.com/v1_4" id="3" />
    </q1:NamedIDValue>
    </q1:DataValue>
    </q1:GenericFields>
      </RNObjects>
    <ProcessingOptions>
    <SuppressExternalEvents>false</SuppressExternalEvents>
    <SuppressRules>false</SuppressRules>
    </ProcessingOptions>
    </Update>
    </soapenv:Body>
     
     
    Here now we are updating custom object record by its record ID, But we are not storing the custom object record ID in Ebs. So to update from ebs we need to use one custom field of custom object which is unique in Ebs. So record of custom object should be updated by that unique field of ebs which is already stored in Service.
     
    Request you to please suggest and provide your valuable feedback.
    Code Snippet:

    Comment

     

    • Gursimran Singh Saini

      It would require two API calls.

      One API call to a Report (or ROQL) passing the Custom Field filter to get the Custom Object ID.
      Second API call to update the Custom Object record with the ID returned in step one.