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
BylithiumBylithium 

Trigger on Quote

Trying to write a Trigger to close all quotes after one quote is closed on an Oppurtunity.

 

trigger CloseAllQuotes on Quote (after update) {

system.debug('Close All the Quotes on the Oppurtunity after one Quote is closed');

ID Oppid = Trigger.new[0].OpportunityId;

if(Trigger.isAfter){
    for (Quote Qt:Trigger.new){
        Qt = [select id,Status from Quote where id=:Oppid];
        Qt.Status = 'Approved';
        Update Qt;
        }
    }
}

Pradeep_NavatarPradeep_Navatar

Couldn't  understand the question. Please clarify your problem.