You need to sign in to do that
Don't have an account?
KSKumaar
Creating related records having a parent-child relationship using the create() in SOAP API
I am very new to SOAP API integration in salesforce.
I am unable to create related records having parent-child relationships. To get some awareness about this process, i gone through Force.com SOAP API Sample WSDL Structures page, here i got some information about Creating related records having a parent-child relationship using the create() API.
But this XML contains <Siebel_Id__c>1-HR68E</Siebel_Id__c> tag which is not understandable by me. Full XML is given below:
This XML is saying Siebel_Id__c is the External Id field present on Account object.
What is External Id field in Account? How can I use this field in XML?
I am unable to create related records having parent-child relationships. To get some awareness about this process, i gone through Force.com SOAP API Sample WSDL Structures page, here i got some information about Creating related records having a parent-child relationship using the create() API.
But this XML contains <Siebel_Id__c>1-HR68E</Siebel_Id__c> tag which is not understandable by me. Full XML is given below:
<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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <urn:SessionHeader> <urn:sessionId>[sessionId retrieved from the login() call]</urn:sessionId> </urn:SessionHeader> </soapenv:Header> <soapenv:Body> <urn:create> <urn:sObjects xsi:type="urn1:Account"> <Name>Sample Account Two</Name> <!-- Siebel_Id__c is the External Id field present on Account object --> <Siebel_Id__c>1-HR68E</Siebel_Id__c> </urn:sObjects> <urn:sObjects xsi:type="urn1:Contact"> <FirstName>Anupam</FirstName> <LastName>Rastogi</LastName> <urn1:Account> <Siebel_Id__c>1-HR68E</Siebel_Id__c> </urn1:Account> </urn:sObjects> </urn:create> </soapenv:Body> </soapenv:Envelope>
This XML is saying Siebel_Id__c is the External Id field present on Account object.
What is External Id field in Account? How can I use this field in XML?
While creating a field, in step number 2 you will get an external ID Checkbox. Click the checkbox and save that field. Use this field in XML as follows
For more clarifications see the below picture how i created