function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mandarmandar 

Setting the record type via API

We have several custom record types for our Salesforce lead/contact objects. I'm interested in setting the record type to be one of these different values when feeding data from different forms into Salesforce. Can someone direct me to the API calls or provide a code snippet that I could use for this purpose?

Thanks in advance for your help!
werewolfwerewolf
Record Type is a lookup field like any other -- you can set the record type via the API just by setting the RecordTypeId to a valid record type ID.  All the record types are stored in the RecordType object.


Message Edited by werewolf on 02-22-2008 02:34 PM
mandarmandar
Great, thanks! I was so dazed by the RecordType object under the contact object that I totally missed the RecordTypeId right under it.