+ Start a Discussion
AmitabhleoAmitabhleo 

How can I update child relationships from a query

Code:
result = sforce.connection.query("Select Name, Id, BillingStreet, BillingCity, 
(Select Opportunity.Id,AccountId, Name, Amount, Opportunity_Assigned_To__c, Gross_Contribution_del__c
From Opportunities where Opportunity.Id = '{!Opportunity.Id}' )
From Account where Account.Id = '{!Opportunity.AccountId}'"); records = result.getArray("records"); for (var i=0; i< records.length; i++) { var record = records[i]; alert("records in array are : "+ records[i])

 I am able to view both the parent and the child query result but I am unable to update the child records, Opportunity Items in this case.

I need to create a nested for but i am unabe to put a condition for the Object type i.e Opportunity.

Thanks in advance,


Message Edited by Amitabhleo on 03-29-2008 07:25 AM