function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Naveed AnwarNaveed Anwar 

C# Setting Lookup Field

Hey there,

 

i am using C# and enterprise.wsdl and my problem is that i want to upsert some record in my custom objects. i have two custom objects Level__c and Consultant__c and there is a lookup field in Consultant__c against Level__c. i do not have Salesforce Id but i have externalId of level

 

two fields are visible in Level__c(Type: string), Level__r(Type: Level__c). which fields needs to be populate

 

do i need to query level__c salesforce id on the basis of external System Id. or is there any other way through which i can achieve this functionality as well ...

 

Thanks!

Naveed Anwar  

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

You can use the externalId to resolve the foreignKey, see http://www.pocketsoap.com/weblog/2008/09/1824.html for an example.

All Answers

SuperfellSuperfell

You can use the externalId to resolve the foreignKey, see http://www.pocketsoap.com/weblog/2008/09/1824.html for an example.

This was selected as the best answer
Naveed AnwarNaveed Anwar

Hey, 

 

having Lookup - Relationship upsert related problem

There is an object in Salesforce "Note" with "Title", "Body", "IsPrivate", "ParentId"

I need to insert account Id's in ParentId 

as you told me in your earliar post that we can upsert - Relationship as well by assigning objects.

how can we do that in this case?

 

Thanks

Naveed Anwar