Scenario
Custom Records are unlike Sales Orders when it comes to web services record creation.
User can create a Sales Order record along with the line items in one add operation request. On the other hand in custom records, users would have to first create the parent custom record, then create the child custom records using the addList operation.
Solution
1. First create the parent custom record using the add operation. (SuiteAnswers ID: 10724 - add)
Sample SOAP Request:
<soapenv:Body> <add xsi:type='platformMsgs:AddRequest'> <record xsi:type='setupCustom:CustomRecord'> <recType xsi:type='platformCore:RecordRef' internalId='recordtypeid' type='customRecord'/> </record> </add> </soapenv:Body>
2. Create the child custom record after the creation of the parent customer record using the addList operation. (SuiteAnswers ID: 10725 - addList)
Sample SOAP Request:
<soapenv:Body> <addList xsi:type='platformMsgs:AddListRequest'> <record xsi:type='setupCustom:CustomRecord'> <parent xsi:type='platformCore:RecordRef' internalId='123' type='customRecord'/> <recType xsi:type='platformCore:RecordRef' internalId='321' type='customRecord'/> </record> <record xsi:type='setupCustom:CustomRecord'> <parent xsi:type='platformCore:RecordRef' internalId='123' type='customRecord'/> <recType xsi:type='platformCore:RecordRef' internalId='321' type='customRecord'/> </record> </addList> </soapenv:Body>
Note: The user must have ample knowledge is Web Services integration and SuiteTalk. Kindly refer to SuiteAnswers article
ID: 87496 - SuiteTalk Web Services.