You need to sign in to do that
Don't have an account?
Need a trigger where when account gets inactivated then all contacts get inactivated too.
Hi, I have custom Status__c picklist field on Account. I have a need when account gets inactivated with value pick "Inactive" then all contacts related to the account should also get inactive (contact also have picklist custom field Contact_Status__c with one of the value as "Active". Apparently, combination of PB and Flow is not working. I would like to tackle this with trigger.
*Also can this be reversble also if account her reactivated again then contacts gets active?
*Also can this be reversble also if account her reactivated again then contacts gets active?
PB - Active Account - Set Account status criteria to Active
PB - Active Account - Update related Contact status to Active
PB - Inactive Account - Set Account status criteria to Inactive
PB - Inactive Account - Update related Contact status to Inactive
If you have any questions, please feel free to reach out to me.
All Answers
Apex Class:
Apex Trigger: Please test and inform me of your results. In the meantime, I am actually going to test to see if this can be done using a PB only.
Flow:
Let me know if you need anything. Thank you.
PB - Active Account - Set Account status criteria to Active
PB - Active Account - Update related Contact status to Active
PB - Inactive Account - Set Account status criteria to Inactive
PB - Inactive Account - Update related Contact status to Inactive
If you have any questions, please feel free to reach out to me.
Create a checkbox field in Contact object, Name it "Salesforce User"
When ever a contact is setup as Partner user, we need to make this field as true. If partner user is deactivated this field should be false.
We want to create a number field on Account object name it "Total Salesforce users" and the total of "Salesforce User" should be captured in this field
For eg. If a Account has 4 contacts out of which 2 has active partner users then "Total Salesforce users" on Account should show 2