2) removes any/all permission sets from deactivated users.
I'm running into an issue because the Flow doesn't recognize that deactivated user may have existing permission sets. The flow isn't bypassing existing permission sets on re-activatedusers; or stopping when it finds existing permission sets, or if it finds one permission set adds the other. Any suggestions?
6 risposte
I would actually break up your flow into 2 separate flows. One that is called when a User record is Activated and the second flow for when a User record is Deactivated.
This way you can focus on the purpose of one flow for adding Permission sets and the other flow is focused on removing particular Permission sets.Your Flow may not be working because of the Loop variable. Your loop variable should have two connector lines drawn out from it. One for what do while in the Loop, and the other for what do after the Loop is finished.
I'm not sure if adding a user to a permission set that they are already a member of causes an error. If it doesn't, perhaps you should just add every activated user to the permission sets, no need to check their existing memberships or loop variables for activated users.
You will need to use that Loop variable on Deactivated Users if you want to be sure they are only removed from certain permission sets, though. You would Lookup the permission sets, Loop through the Sobject group, go into the Decision element that checks if the current Permission Set Record is the one you want to remove and then removes it. This (and the other outcome from your Decision element) would then connect back to your Loop element.