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 (40 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

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)
0 votes
1 answer

When we create a new user in Adaxes, we can select the job title in a dropdown because we have defined it in the property pattern. Now I would like to create a custom ... How can I bring the same dropdown from "create user" into my custom command? Thank you!

asked Sep 25, 2023 by DRiVSSi (300 points)
0 votes
1 answer

Here is my issue, When I use this code: $DNs = %param-GroupsInRole% $Groups = $DNs -split "|" %Param-GroupsInRole% can have multiple groups. When setting up the parameter I am ... I just need to be able to do a foreach with the groups picked by the initiator.

asked Mar 23, 2023 by mightycabal (1.0k points)
0 votes
1 answer

Occationally Service Desk staff need to clear a DNS record when a desktop has been reimaged but is keeping the same name as loses the ability to manage its original DNS ... running in ADAXES. Can I just install the applet on the ADAXES server using powershell?

asked Jan 17, 2023 by stevehalvorson (110 points)
3,472 questions
3,165 answers
8,057 comments
547,017 users