You need to sign in to do that
Don't have an account?
steven.warren
Using partner WSDL to upsert foreign key relationship on custom object
Hi, I am able to upsert a contact record referencing the external field of its account relationship. But if I try to do that with a custom table I get the following error:
"Unexpected element {}type during simple type deserialization"
Does anyone have any experience or insight into this issue? Here's the code fragment in question:
Message Edited by steven.warren on 04-08-2008 04:45 PM
"Unexpected element {}type during simple type deserialization"
Does anyone have any experience or insight into this issue? Here's the code fragment in question:
Code:
ArrayList elements = new ArrayList(); elements.add(new MessageElement(new QName("SPS_Account_ID__c"), id)); // Foreign key relationship to the Account object MessageElement client_me = new MessageElement(new QName("Account__c")); client_me.addChild(new MessageElement(new QName("type"), "Account")); client_me.addChild(new MessageElement(new QName("Client_ID__c"), accountID)); elements.add(client_me); SObject[] sObjects = new SObject[1]; sObjects[0] = new SObject(); sObjects[0].setType("SPS_Account__c"); sObjects[0].set_any((MessageElement[]) elements.toArray(new MessageElement[elements.size()]));
Message Edited by steven.warren on 04-08-2008 04:45 PM
Hello Steven,
Can you please give me the code snippet to upsert foreign key relationship on an object using Partner WSDL
(may be using Account and Contact)?
Regards,
Ramana Maddikunta
Simon,
Can you point me to a c# solution for partner wsdl that uses external ID of parent to insert child object?
I just posted an example to the .NET board
http://community.salesforce.com/t5/NET-Development/Create-with-foreign-keys-with-partner-API/m-p/184390