You need to sign in to do that
Don't have an account?
Karthikeyan Chandran
Need help on trigger
Hi,
Using trigger, I just want to auto create new contract records under the opportunity when ever the Opportunity record record type is set to (Record Type1 or Record Type2 or Record Type3) and Opportunity Stage = Closed Won. also the Contract Record owner will be same as the Opportunity Owner for the auto created record.
Thanks & Regards,
Karthikeyan Chandran
Using trigger, I just want to auto create new contract records under the opportunity when ever the Opportunity record record type is set to (Record Type1 or Record Type2 or Record Type3) and Opportunity Stage = Closed Won. also the Contract Record owner will be same as the Opportunity Owner for the auto created record.
Thanks & Regards,
Karthikeyan Chandran
On go to opportunity . New Trigger
(After insert )
{
if(Trigger.new.Stage='Close won' && (Trigger.new.recordType.Name='a'||Trigger.new.recordType.Name='b'||Trigger.new.recordType.Name='c'))
Contract c=new Contract (Related_Opportunity__c =oppty.id);
insert c ;
}
(After update )
{
if(Trigger.new.Stage='Close won' && (Trigger.new.recordType.Name='a'||Trigger.new.recordType.Name='b'||Trigger.new.recordType.Name='c'))
Contract c=new Contract (Related_Opportunity__c =oppty.id);
insert c ;
}
All Answers
On go to opportunity . New Trigger
(After insert )
{
if(Trigger.new.Stage='Close won' && (Trigger.new.recordType.Name='a'||Trigger.new.recordType.Name='b'||Trigger.new.recordType.Name='c'))
Contract c=new Contract (Related_Opportunity__c =oppty.id);
insert c ;
}
(After update )
{
if(Trigger.new.Stage='Close won' && (Trigger.new.recordType.Name='a'||Trigger.new.recordType.Name='b'||Trigger.new.recordType.Name='c'))
Contract c=new Contract (Related_Opportunity__c =oppty.id);
insert c ;
}
Thanks for the quick response, let me with the above suggestion.
if you face any problem . please ask .
Thanks