You need to sign in to do that
Don't have an account?
Alvin Dutt 6
Contacts REST API
I am using REST API to get data of all contacts in my salesforce. When retrieving the object, there is 2 json values for Account ID (Account Id and Account.Id) which one should be used and why is there 2?
The value in both the fields will be same, but the return types are diferent.For Account.Id, the return type will be an object.
Let me know if this helps.
Thanks and Regards,
Nikita
Thank you for your reply.
I am a bit confused on the return type(s) you are referring to. I am using JSON.NET to Deserialize the call, and when I examine the results after deserializiation, both values are string.
It didn't return back and object, so my question is am I parsing the result incorrectly? Either way if you state that both of the values are the same, which one do you recommend I use? Note that I am asking this because I am unsure of whether or not the devs @ SalesForce will change the output of the interface later on and my code will break.
Thank you.
When you deserialise a JSON format, using [object] type is more advisable.
It should not break the code.
Thanks and Regards,
Nikita Acharya