This is a discussion on Upsert Record(s) related to other Objects within the Salesforce Coding Discussions forums, part of the Salesforce category; Hi,
after searching for hours I would like to ask how you
-
Upsert Record(s) related to other Objects
Hi,
after searching for hours I would like to ask how you do upsert/create records containing lookup-fields to objects with theire own external ID.
e.g.: Contact has its own external ID = Contact_ext_ID__c
Account has its own external ID = Acc_ext_ID
I would like to upsert contacts like this
Contact_ext_ID__c = "23523AG",
Account.Acc_ext_ID__c = "A540065" //can't get this field matching during upsert/create
Info__c = "Prospect"
Name = "Mike",
City = "Hollywood";
best regards
UPDATE: There is another thread that is not really solved in PHP: http://www.mikesimonds.com/setting-l...4.html#post422
Last edited by quantentunnel; 02-18-2010 at 08:49 AM.
-
Maybe I am not understanding you fully, but it seems what you are trying to do is not possible. If you have an external ID set on Accounts, then you have to use that external ID to upsert to that object. Same goes for contacts or any other object. Now if I am wrong with your question, please be more clear and I am sure that I can help you out
Thanks for joining the site!!
~Mike
-

Originally Posted by
quantentunnel
Hi,
after searching for hours I would like to ask how you do upsert/create records containing lookup-fields to objects with theire own external ID.
e.g.: Contact has its own external ID = Contact_ext_ID__c
Account has its own external ID = Acc_ext_ID
I would like to upsert contacts like this
Contact_ext_ID__c = "23523AG",
Account.Acc_ext_ID__c = "A540065" //can't get this field matching during upsert/create
Info__c = "Prospect"
Name = "Mike",
City = "Hollywood";
best regards
UPDATE: There is another thread that is not really solved in PHP:
http://www.mikesimonds.com/setting-l...4.html#post422
Hi Quant,
You can do this it just might require two steps. You can't use two external IDs for one upsert which is why Account.Acc_ext_ID__c = "A540065" won't work.
In order to do this, you can use your existing detail but make the Account.Acc_ext_ID__c the Salesforce.com generic AccountID from the Contact Object.
In this case, you can keep your data structure and populate your external ID to the contact and then use the AccountID to associate it with the proper account.
Because you have an external ID for the account, I would assume that you could simply export your current Account table with the external ID and then use a vLookup to match that against your upsert file.
I hope this helps!
-
Hello
Have you been able to get a solution for this
If so please post it
Regards
Mevin
-
Similar Threads
-
By jlowtek in forum Salesforce PHP Tutorials
Replies: 3
Last Post: 08-04-2009, 08:01 AM
-
By eliana in forum Salesforce Coding Discussions
Replies: 13
Last Post: 05-23-2009, 09:08 AM
-
By mike in forum Salesforce PHP Tutorials
Replies: 2
Last Post: 03-27-2009, 01:14 PM
-
By mike in forum Salesforce Coding Discussions
Replies: 4
Last Post: 11-06-2007, 03:19 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Bookmarks