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
Amruta ChaudharyAmruta Chaudhary 

update child object id field on parent object

There is 2 object Opportunity and Quote . when we create quote and if this is primary checkbox is checked then quote number should update on opportunity record field . 
how write this logic in class 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Amruta,

We can use After insert context and write thw trigger on Quote object. But If I have created a Quote 1 with primary check box as true then the opporunity field will be updated with the Quote1 Number. 

Next if Another quote with Primary check box true is created so do you want the field on opportunity  to update with second quote number or stay as it is with the first quote number?