Simplification of record type identifier references

When using Salesforce SOAP API via PHP, if I have an object that has a search field for an account with a specific field in the account that is configured as an external identifier, I can do the following

$sfBooking->fields['Account__r'] = "<type>Account</type>"
    . "<custom_account_id__c>"
    . utf8_encode($tboxBooking->client_id)
    . "</custom_account_id__c>";

This is very convenient when trying to link records without resorting to using their Salesforce ID.

I am wondering if there is a similar type of abbreviations that I can use when setting the type of writing to objects via the API. To get the record type identifier by first querying the Record Type object, this is the step I would like to cut, if at all possible.

+3
source share
2 answers

, RecordType, xml

    <create xmlns="urn:partner.soap.sforce.com">
        <sobject>
            <type>case</type>
            <subject>Test</subject>
            <recordType>
                <type>RecordType</type>
                <name>InternetCase</name>
            </recordType>
        </sobject>
    </create>

, ,

$sfBooking->fields['RecordType'] = "<type>RecordType</type>"
    . "<name>"
    . utf8_encode($tboxBooking->recordType_name)
    . "</name>";
+1

, RecordType. , RecordType , .

, / DeveloperName Id. / lookup RecordType DeveloperName RecordType Salesforce.

+1

All Articles