Pages

Tuesday, August 9, 2016

Salesforce: Auto Enable Marketing User

Use Case: some user need to be auto enable with Marketing User in the user detail because they need to add Contact / Lead to Campaign, see this blog for detail.

Solution:
1. Create Auto-launched Flow
2. Create Process Builder

Auto-launched Flow
We need this flow called by Process Builder because field UserPermissionsMarketingUser in User object is not accessible from Process Builder, you need to have a Record Update process with a variable use as input of User Id.

Vote for this idea to allow Process Builder able to access all fields in the object.


Process Builder
With Process Builder on User creation, call above Flow and pass the User Id to that flow.



With simple Process Builder + Auto-launched Flow above, new user created will be have Marketing User auto check, you can add criteria in Process Builder if need to evaluate certain Profile or Role or etc.

Note: deactivate and re-activate user will not effect Marketing User checkbox, so it is not necessary to run the Process Builder on user update.



No comments:

Post a Comment

Page-level ad