You need to sign in to do that
Don't have an account?

display one child record id on another child record
Hi All,
I have the below requirement. I have one parent and 2 childs. i want to get ids of two child records and update a field with id of child 2 on child1 and vice versa. How can i do this?
Thanks.
I have the below requirement. I have one parent and 2 childs. i want to get ids of two child records and update a field with id of child 2 on child1 and vice versa. How can i do this?
Thanks.
You can use inner query for querring child record from parent
for eg:
consider this scenario,
account as parent , contact and opportunity as child Hope this helps..
Nested SOQL :
In Nested SOQL, we can retrieve the data of the related object using the SOQL query. We can query on the parent object and get details about parent and child records.
For example, following SOQL query retrieves Accounts, related Contacts, and related Cases associated with each Account:
Select Id, Name, (Select Id From Contacts), (Select Id From Cases) from Account LIMIT 10
Please mark as best answer if it helps you.
Thank You,
Ajay Dubedi
Thanks for your thoughts.
Here I have Account and contact1, contact2. I need to query and then update Id in contact1 with Id of contact2. I am getti the records in query but how to assign values? Please help.
Thanks.