You need to sign in to do that
Don't have an account?
Kian Salehizadeh
Check a checkbox if a Contact has an associated Opportunity or Meeting
This is my first time trying to code a trigger in Salesforce. I have a checkbox labeled "Priority Contact," and I'd like the checkbox to be checked for all contacts that have at least one Opportunity or Meeting event linked to them. Could you please advise on how I should go about doing this? I'm also not 100% sure where to enter the code to activate the trigger. Thank you.
Samruddhi Gokhale
Write a trigger on Opportunity so that whenever an opportuniy is added, you will set the checkbox on associated contact to true. Also notice that your trigger should uncheck the checkbox when an opportunity is deleted (only if that is the only opportunity associated with that contact)
Kian Salehizadeh
Do you have any sample code you can provide to help me get started with this? I have no background in the coding side of things.