You need to sign in to do that
Don't have an account?
algot algot
Set RecordType on Contact ceation via Enterprise API
I have created a C# project, connect Salesforce Enterprise WSDL as WebReference and trying to create the Contact
And get an error:
"Field name provided, Id is not an External ID or indexed field for RecordType"
How should I set RecordType in this case?
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 });
And get an error:
"Field name provided, Id is not an External ID or indexed field for RecordType"
How should I set RecordType in this case?
Greetings to you!
- I implemented in my Org. Please use the below code[Solved] : -
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.
All Answers
Greetings to you!
- Please use the below code : -
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.
'The name Schema doesn't exist in the current context'
Greetings to you!
- I implemented in my Org. Please use the below code[Solved] : -
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.