Creating AD accounts using nintex workflow

  • 21 August 2016
  • 7 replies
  • 8 views

Badge +2

I'm able to hard code the different field values to successfully create an AD account . When I attempt to pass the variables from a form (firstname, lastname etc) am getting a error . The fields are all single line of text . When I switch to use multiple lines of text and change the field type to plain text it works . Having multiple lines of text as fields on the forms  to capture first name, last name etc looks clumsy . How do I use single line of text as fields on the form and ensure the data captured is just plain text .

Thanks


7 replies

Userlevel 7
Badge +17

I'm not sure why the multiple lines of text would be required for the AD account creation, but if that is what is working for you, you could put the SLT controls on the form, but in the workflow set a variable that is a MLT to the value of the firstname SLT control on the form. Then use the Multi line variable in the AD creation.

Badge +2

Thanks Andrew . I tried your suggestion and it didn't work . For some reason being able to set the MLT to plain text when adding the list item works but setting SLT to MLT with within the workflow does not work .

Userlevel 7
Badge +17

That is so weird, I can't make sense of it, but I believe you wholeheartedly. Can you output the two methods using log to history to see if there is any data different? I guess the data is the same but for some reason the datatypes are different.

Userlevel 6
Badge +13

What's the error you're getting?

Badge +2

error - Failed to create Active Directory account. An invalid directory pathname was passed .

Two methods work fine for me .

(1) If I hard code the values

(2) If I were to switch the fields from SLT to MLT and change the data type to 'plain text' .

It appears as if the SLT has workflowerror.jpg hiddenn/escape characters that is throwing it off .

Badge +2

Andrew, when I output the log to history, SLT field is blank while the MLT field is not .

Badge +2

Guys I think I found my issue . I created two forms one to create a user and one to edit user details using the same form variables . I'm hiding the panel (create/edit user) base on user selection. Once I created different form variables for the add user form and the edit user form the workflow worked . So am keeping my fingers crossed for now . in the past whenever I created the MLT to test I gave it a different name to the SLT thus the reason why it always works .

Andrew, you pointed me in the right direction by asking me to log the two variables . 

Thanks guys !!!

Reply