You need to sign in to do that
Don't have an account?

Automatically select emailoptout if contact marked as inactive
I've built a custom contac checkboxt field which just reads "inactive" which users select if the contact leaves the account. What I'd like to do is whenever that box is selected the "emailoptout" checkbox is also automatically selected.
I'm sure this can be done in validation or trigger, but I don't have much experience using those tools. Can someone help me get started on that?
I'm sure this can be done in validation or trigger, but I don't have much experience using those tools. Can someone help me get started on that?
Go to Setup - Create - Workflow and Approvals
The click on New and select Contact.
Set the evaluation criteria to - Every time a record is created or edited
Then select the rule criteria option as Formula Evaluates to True.
The set a formula that suits your need:
Something like
AND(
ISCHANGED( inactive__c ) ,
inactive__c = true
)
Then add an immediate action to this workflow. The immediate action will be set on the contact object and choose the EmailOptOut field.
Then select the False value.
Save it and then activate the workflow rule. Please let me know if this works.
Thanks,
Kaustav
All Answers
If you want to update a field based on other field than we mostly go with workflow.
By workflow you can set creteria when workflow need to execute and which field you need to update.
We can write trigger but salesforce provide a automation then we use every thing of salesforce in good way. It's depend on you which approch you would like to go with
Go to Setup - Create - Workflow and Approvals
The click on New and select Contact.
Set the evaluation criteria to - Every time a record is created or edited
Then select the rule criteria option as Formula Evaluates to True.
The set a formula that suits your need:
Something like
AND(
ISCHANGED( inactive__c ) ,
inactive__c = true
)
Then add an immediate action to this workflow. The immediate action will be set on the contact object and choose the EmailOptOut field.
Then select the False value.
Save it and then activate the workflow rule. Please let me know if this works.
Thanks,
Kaustav