+ 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.