You need to sign in to do that
Don't have an account?
albonill
Need help creatng a trigger to avoid deletion of Opportunities
Hello,
I need assistance in the creation of a trigger that will not allow the deletion of an Opportunity under the following circumstances:
- If there is an Agreement Name (Name) (echosign_dev1__SIGN_Agreement__c is object)
- Or if there is a Sales Order No (Name) (Sales_Order__c is object)
- Or if there is an Sales Invoice No (Name) (Sales_Invoice__c is the object)
- Or if there is a Google doc, note or attachment present in the Opp
Thank you for your help.
Regards,
Alex
Apex script
Let me know if you need any more assistance.
Thanks,
bForce
All Answers
DOes below mentioned objects are in Opportunity related list ?
For Attachment and notes : what you want to check ...... means Name of attachment/note contain google Doc ?
Clarify above issues, I will help you to write trigger
Thanks,
bForce
Hello b-Force,
Yes, all of the mentioned objects are in the Opportunity related list section. For the Google Docs section, I guess it would be sufficient to check if there is an attachment present (don't worry about notes or Google Docs since we only use attachments) in order for deletion to be denied. Thanks for your help.
Regards,
Alex
Apex script
Let me know if you need any more assistance.
Thanks,
bForce