You need to sign in to do that
Don't have an account?
Mohana Priya Swamiappan
unknown error parsing in nested soql queries
I have 2 objects viz., User, Contact.
Both the objects have a custom field called org1userId which is an Id in an ecternal system. I also have a custom field(UserId) in contact to store the Id of the user record.
I want to fetch Id from user and userID from contact which matches the org1userId.
My sql is as follows
select u.Id , c.userId__c from user u, contact c where u.org1userID__c='xxxxxxxxxxxx' and c.org1userID__c='xxxxxxxxxxxx'
I am unable to convert this query into a soql.
I am an amateur in salesforce. Any help is much apprecitaed. TIA
Both the objects have a custom field called org1userId which is an Id in an ecternal system. I also have a custom field(UserId) in contact to store the Id of the user record.
I want to fetch Id from user and userID from contact which matches the org1userId.
My sql is as follows
select u.Id , c.userId__c from user u, contact c where u.org1userID__c='xxxxxxxxxxxx' and c.org1userID__c='xxxxxxxxxxxx'
I am unable to convert this query into a soql.
I am an amateur in salesforce. Any help is much apprecitaed. TIA
UserId is a custom lookup field or formula field. Please let me know so that can i can help you according;y.
Please try once below query.
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
Blog: http://salesforceprasad.blogspot.com/
Salesforce latest interview questions :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1