0 votes

I have an issue in a custom command that I need a workaround for. In step 1, a Modify User command is used to change the User Principal Name of the account. Farther down in the custom command, I tried using the %userPrincipalName% calculated variable, but it used the old UPN from before Step 1 ran.

How can I update %userPrincipalName% to use the new value, or can I declare a new calculated variable that contains the new UPN?

by (190 points)
0

Hello,

Sorry for the confusion, but we are not sure what exactly you have configured. Could you, please, describe the workflow in all the possible details with lie examples and screenshots? You can post the details here or send to us at support@adaxes.com.

0

I think you can't bring over variables from one step/script to the next one, without it being a parameter of the custom command.

If step1 actually executes and writes the info to the AD object, then $context would still have the old information that was there when the command started (I think), but you could query AD to get the new value. Using a parameter or just doing the same UPN caluclations in step2 might be more reliable. It might be counterintuitive to re-do the logic in step2 that's already present step1, but it could be more practical anyway.

0

Hello Felix,

Your assumption is incorrect. If you set a property value in one action of a custom command, scheduled task or business rule, it is possible to retrieve the value in a following action executing a script with method $Context.TargetObject.Get.

Please log in or register to answer this question.

Related questions

0 votes
1 answer

We have a series of transforms we use for users including moving to different OU's. Is there a way to open the user's object after the command completes much in the same way a user creation does?

asked 6 hours ago by msheppard (470 points)
0 votes
1 answer

The use case we are looking for is providing a list of titles for users to choose from when initiating a re-hire. We already have a title property pattern established and would ... that we can manage the list in one place. Let me know and as always, thanks.

asked 7 hours ago by msheppard (470 points)
0 votes
1 answer

Is it possible during a custom command to prompt input from the user initiating the command and to take a different action depending on their answer? For example, ... provide the automatic reply text If No - proceed with predetermined reply text. Thanks

asked Oct 28 by msheppard (470 points)
0 votes
1 answer

To the left of the user object there are several custom commands showing. I don't want our service desk to see them. Why are they showing? How do I remove them. Must be something simple. They only see these when looking at a user Object.

asked Jan 17 by mightycabal (1.0k points)
0 votes
1 answer

Then I could put the approval on the custom command.

asked Dec 4, 2023 by mightycabal (1.0k points)
3,548 questions
3,238 answers
8,232 comments
547,810 users