0 votes

We have employees that work at more than one location, we would like them to be on the staff lists at those locations as well as their main location.

This is the solution I came up with, it might not be the best way to do this....

We have their main location setup as the Department field, but setup 4 additional fields using the CustomAttributeText fields They are AlternateLocationA, AlternateLocationB, AlternateLocationC and, AlternateLocationD

We have a separate rule for each Alternate Location and if it changes, add the user the appropriate group based on what the content of that field is.

Unfortunately, it is only firing on the Alternate Location A changed and not even touching the others, Here is a screenshot of the result. Jake was added to two locations, but only the first rules actions applied.

2020-05-25 14_06_54-Jake Three.png

Here are a snippet of the rules... After Alternate Location A Changed... 2020-05-25 14_12_32Alternate Location A.png

After Alternate Location B Changed... 2020-05-25 14_11_43-Alternative Location B.png

by (60 points)

1 Answer

0 votes
by (294k points)

Hello,

This is the solution I came up with, it might not be the best way to do this

It is recommended to perform such actions after the update was made, not before it to make that the actions are performed on time. As such, your Business Rules should look like the following: image.png Additionally, you might consider using a single Business Rule and a PowerShell script that will adjust group membership for the user accordingly. In this case, the rule will look like the following: image.png If this approach meets your needs, please, provide us with all the possible details regarding the group membership update that should be performed when either of the alternative locations gets updated and we will provide you with the script.

Unfortunately, it is only firing on the Alternate Location A changed and not even touching the others

You need to make sure that the Activity Scopes of all the Business Rules triggering upon alternative locations update include all the users for who they should trigger. image.png For information on how to check Business Rules effective for an object, have a look at the following help article: https://www.adaxes.com/help/?ManageBusinessRules.ViewBusinessRulesEffectiveForADObjects.html.

0

Please tell me there is an easy way to switch from a Before action to an After. I cannot find a way to do this, I also can't seem to find a way to copy an action block. This rule is currently about 100 lines per rule that will have to rewritten out and there is 4 of them.

I agree there is probably a better way to do this with Powershell, but want the framework down first before optimizing in this case.

Thanks,

0

Ok I just figured out how to copy and paste action sets, phew.

Related questions

0 votes
1 answer

Hi, I have a business rule that triggers on creation of a user In its actions it: Moves the user to a specific OU Calls a powershell script to mailbox enable the ... action that would normally fire it was caused by another business rule? Thanks in advance Phil

asked Nov 5, 2014 by philt (20 points)
0 votes
1 answer

Hi all, I need to update, during business rules, a custom Attribute with the last 5 characters from an other custom Attribute. EX: employeeNumber = 0123456789 adm- ... I received an error in substring function, can you help me? Thanks in advance

asked Nov 9, 2022 by Simone.Vailati (430 points)
0 votes
1 answer

Hello, I've setup an Business Rule with trigger after creating user object. I deal inside with multiple types of objects (Employee-, Shared Mailbox-, Admin-Accounts,..), ... and screenshot about my current config. thank a lot in advanced best regards R.Aich

asked May 16, 2022 by R.Aich (20 points)
0 votes
1 answer

Is it possible to export Business Rules and/or Custom Command, from the Admin Console, so that we can have a backup of the current setup? I especially want to have a document of the Custom Commands and their IDs, which I'm using in PowerShell scripts.

asked Feb 26, 2014 by sdavidson (730 points)
0 votes
1 answer

I have a question: I have a security role that allows specific users to modify "extensionattribute2" in AD. Is it possible to create an approval for this that would ... manager of the target account to approve the change before it is really applied? Thanks!

asked Jan 16, 2012 by BradG (950 points)
3,588 questions
3,277 answers
8,303 comments
548,093 users