You need to sign in to do that
Don't have an account?
Leonard Silon 8
How to check a box if there is a specific attachment on a contact
On the contact if a user attaches a file ot the notes and attachments with a file name that begins with "Opt-Up Professional" that a check box named Opt-Up Attached gets checked. I have read enough to know a trigger is needed. However, I can not find anythign specific to my needs. Does anyone have code they can share with me - - please note while i can basically read code, I am not a developer. We also have no developer on site so any help would be greatly appreciated!!
All Answers
Something like this should help.
It might not be following all the standards but it works. Also, you can add a if(trigger.isDelete) so that the checkbox gets unchecked if someone deletes the attachments.
Let me know if it helps.
Thank you
Trigger name, checkboxifattached, exists on different SObject type: Contact
Looks like you have a trigger with the same name on Contact object also. Can you please check if thats the case?
Let me know if you need help with this and mark it as best answer so that it can be helpful to others.
Thank you
After saving your test class, click on Run Test and then go back your trigger to see if it is 100% covered.