You need to sign in to do that
Don't have an account?
Priyanka Chandrakanth
updating query lead fields from opportunity
Opportunity opp1 = [select field1__c,(Select field2__c,id From Leads__r) from Opportunity where id='006q0000xxxxxx'];
opp1.Leads__r.field2__c = 'text';
update opp1;
Above logic throws the following error. Can anyone help me in achieving the above logic?
Error:
Line: 2, Column: 1
Invalid foreign key relationship: Opportunity.Leads__r
Thanks in advance!
opp1.Leads__r.field2__c = 'text';
update opp1;
Above logic throws the following error. Can anyone help me in achieving the above logic?
Error:
Line: 2, Column: 1
Invalid foreign key relationship: Opportunity.Leads__r
Thanks in advance!
By default Opportunity is not related to Lead object. Have you created a custom field for lead in Opportunity object?
Regards.
Please refer to this thread:
http://salesforce.stackexchange.com/questions/28557/select-statements-in-a-multi-join-soql-query (http://salesforce.stackexchange.com/questions/28557/select-statements-in-a-multi-join-soql-query" target="_blank)
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.