Я создал проект C #, подключил Salesforce Enterprise WSDL как WebReference и пытаюсь создать контакт
var recordTypes = sforceService.query("select Id from RecordType where sObjectType = 'Contact'");
var contact = new Contact
{
LastName = textTemplate,
RecordType = (RecordType)recordTypes.records[0],
Email = textTemplate + "@test.com",
Phone = "1234567890",
};
res = sforceService.create(new sObject[] { contact });
и получите ошибку:
"Field name provided, Id is not an External ID or indexed field for RecordType"
Как мне установить RecordType в этом случае?
* +1008 * UPD. Я должен заполнить
string RecordTypeId
поле вместо
RecordType RecordType
поле
RecordTypeId = recordTypes.records[0].Id