You can try to have different opportunity pagelaout and recordtype for Approved ones. In this pagelayout, don't show the Note and Attachement in related list. But this will also make user not able to check any previous notes.
Hi @Narender Singh , I have tried the code you provided and tried other way also it's allowing me to attach the documents and log is also not captured.So I couldn't identify where it went wrong. Any suggestion pls
Hi @Narender Singh, I have found out the issue. The problem is my Org is in LIghtning mode so when the org is in Lightning mode trigger should be written on ContentDocumentLink its working fine now. Thanks for your help .
You will have to write a trigger. Your trigger will look something like this:
Note: You will have to write a similar trigger on Note if you want same validation for notes as well.
Please mark it as the best if it helps you.
Thanks
All Answers
You will have to write a trigger. Your trigger will look something like this:
Note: You will have to write a similar trigger on Note if you want same validation for notes as well.
Please mark it as the best if it helps you.
Thanks
You can try to have different opportunity pagelaout and recordtype for Approved ones. In this pagelayout, don't show the Note and Attachement in related list. But this will also make user not able to check any previous notes.
Regards,
Narender