You need to sign in to do that
Don't have an account?
Populate RecordType in a Create SObject Rest Call, in case there are more than one RecordTypes with the same Name
Hello guys,
Is there any solution from when we have more than one Record Types (at different Sobjects) with the same Name?
In my org I have 2 Service types with the name : "Service" in both Account and Case Object.
The answer I get from the server when I make a Rest Call to create an Account with RecordType : "Service" is:
[
{
"message": "Name: more than one record found for external id field: [012090000005uVyAAI, 01 2090000005uWHAAY]",
"errorCode": "DUPLICATE_EXTERNAL_ID",
"fields": [
"Name"
]
}
]
So basically it doenst know what Record type to apply.
II have tried populating the SobjectType but it doenst work.
What i did :
"RecordType": {
"Name": "Service",
"SobjectType" : "Account"
}
Answer I get from server:
[
{
"message": "More than 1 field provided in an external foreign key reference in entity: RecordTyp e",
"errorCode": "INVALID_FIELD",
"fields": []
}
]
Recommend reviewing https://patlatus.wordpress.com/2016/07/07/how-to-populate-relationship-using-external-id-field-in-salesforce/
Related:https://developer.salesforce.com/forums/?id=906F00000008rhDIAQ
If this information helps, please mark the answer as best. Thank you