You need to sign in to do that
Don't have an account?
tyler young 35
I'm using the Salesforce.Force NuGet package to upsert records, and if I don't include the Address property on the Lead, it works just fine. When I include Address, it gives the following error (in JSON):
[{"message":"Cannot deserialize instance of Address from VALUE_STRING value IROQUOIS at [line:1, column:21]","errorCode":"JSON_PARSER_ERROR"}]
The relevant JSON sent to the server is:
{"Address":
{
"City":"IROQUOIS",
"Country":"Canada",
"CountryCode":"CAN",
"PostalCode":"K0E 1K0",
"State":"ONTARIO",
"StateCode":"ON",
"Street":"SENSITIVE_DATA_HERE"
},
"Company":"SENSITIVE_DATA_HERE",
"Description":"SENSITIVE_DATA_HERE",
"Email":"SENSITIVE_DATA_HERE"....}
Any ideas on why it's having trouble deserializing the address?
"Cannot deserialize instance of Address from VALUE_STRING value" using C# API
I'm using the Salesforce.Force NuGet package to upsert records, and if I don't include the Address property on the Lead, it works just fine. When I include Address, it gives the following error (in JSON):
[{"message":"Cannot deserialize instance of Address from VALUE_STRING value IROQUOIS at [line:1, column:21]","errorCode":"JSON_PARSER_ERROR"}]
The relevant JSON sent to the server is:
{"Address":
{
"City":"IROQUOIS",
"Country":"Canada",
"CountryCode":"CAN",
"PostalCode":"K0E 1K0",
"State":"ONTARIO",
"StateCode":"ON",
"Street":"SENSITIVE_DATA_HERE"
},
"Company":"SENSITIVE_DATA_HERE",
"Description":"SENSITIVE_DATA_HERE",
"Email":"SENSITIVE_DATA_HERE"....}
Any ideas on why it's having trouble deserializing the address?
I get the response:
{
"message": "Cannot deserialize instance of Address from VALUE_STRING value Nelson at [line:2, column:18]",
"errorCode": "JSON_PARSER_ERROR"
}
]
{
"message": "Unable to create/update fields: Address. Please check the security settings of this field and verify that it is read/write for your profile or permission set.",
"errorCode": "INVALID_FIELD_FOR_INSERT_UPDATE",
"fields": [
"Address"
]
}
]
Gives:
{
"id": "00Qo000000Hd2IxEAJ",
"success": true,
"errors": []
}
Does the Salesforce Toolkit (https://github.com/developerforce/Force.com-Toolkit-for-NET) provide directly properties that you can set on the Lead for City, Country, State, etc..?