trigger updateContract on Contract (after insert, after update)
{
List <Order> ordList = new List <Orders>();
List <Id> cons = new List <Id>();
for(Contract con : trigger.new)
{
cons.add(con.Id);
}
//Write down your relationship query here
ordList = [ Select id from Order where contracted=true and ID in:cons]
for(Order ord: ordList) {
//update your orders here
}
}
NOTE: The code provided is an example. You'll need to review and make modifications for your organization.
If you find this information helpful, please mark this answer as Best. It may help others in the community. Thank You!
NOTE: The code provided is an example. You'll need to review and make modifications for your organization.
If you find this information helpful, please mark this answer as Best. It may help others in the community. Thank You!