EscapeDNComponent

Hi,

I use a display name format of lastname, firstname so I'm trying to use EscapeDNComponent to escape the comma. However, I get an error when the WF executes:

Object Reference not set to an instance of an object

If I use "DisplayName" directly, the WF generates the correct string. 

My customexpression looks like so:

EscapeDNComponent("CN=" + DisplayName)

I'm sure its bombing out at this point. If I remove the CustomExpression and do a simple "CN=" + DisplayName, the correct string is generated (but ofcourse that won't work when provisioning to AD)

Also, I'm trying to use this as part of a function evaluator which constructs the DN then passes it to the sync rule. Is there a limitation that EscapeDNComponent cannot be used inside a function evaluator?

Thanks


  • Edited by kmittal82 Monday, January 27, 2014 3:17 PM
January 27th, 2014 6:10pm

Hi!

I had som problem with this to but this works for me.

EscapeDNComponent(CustomExpression("CN="+displayName))+",OU=Users,DC=contoso,DC=com"

(I do not have this as a single customexpression but as a EscapeDN function + string)

/Robert


  • Edited by Robert Kielén 23 hours 6 minutes ago typo
  • Marked as answer by kmittal82 22 hours 45 minutes ago
  • Unmarked as answer by kmittal82 22 hours 45 minutes ago
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2014 7:46am

Hi Robert,

Thanks, I'll try it out in my lab but I think this will work!

Cheers

January 28th, 2014 8:09am

Hi!

I had som problem with this to but this works for me.

EscapeDNComponent(CustomExpression("CN="+displayName))+",OU=Users,DC=contoso,DC=com"

(I do not have this as a single customexpression but as a EscapeDN function + string)

/Robert


  • Edited by Robert Kielén Tuesday, January 28, 2014 12:43 PM typo
  • Marked as answer by kmittal82 Tuesday, January 28, 2014 1:04 PM
  • Unmarked as answer by kmittal82 Tuesday, January 28, 2014 1:04 PM
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2014 3:42pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics