workflow activity to generate mailnickname RRS feed

  • Question

  • Is there a fim wal function which can replace all the special characters to a defined character in generating mailNickName? For example, in the exchange workflow I have got, I am just replacing the space with a.

    Left(ReplaceString([//Target/LastName]," ","a"),8)

    But there are many names with special characters like - '. Is there a way to replace all the special characters with a defined character.


    Thursday, October 3, 2013 7:32 PM

All replies

  • Hello,

    there is no OOB function to do so, but you can nest multiple ReplaceString function.
    Another way is to create your own Custom Activity for that, or use maybe the FIM Powershell Activity for that.

    Also possible is to do that in good old code extensions in the SyncEngine.


    Peter Stapf - Doeres AG - My blog:

    Thursday, October 3, 2013 8:38 PM
  • Thanks.

    A)In case of powershell, how to check for uniqueness against both FIM and AD.

    B)Can you give me some examples of code extension to generate a value?

    Thursday, October 3, 2013 8:58 PM
  • Hello,

    this questions sounds more be relevant to your other current thread, but anyway


    just generate the new nickname, then user ExportFIMConfig to check if objects exists with this nickname in Portal, after that use AD PowerShell cmdlets or a ADSearcher Object to check against AD.
    But i think that isn't the fastest way, i would better to this in code extension.

    B) Make sure you have all mailnicknames in MV on the objects (even the old ones in your multivalue attribute), in your code extension use the Utils.FindMVEntries Method to check if objects with this nickname are already present.

    In both cases if the nickname exists, create a new one according to your business rules.

    For example:

    We generate samAccountNames like this in code extension.
    We generate accountname as the Lastname first, then checking if it exists with FindMVEntries, if it exists we add the first character of the Firstname, and so on, always making sure that the name does not exceed 15 characters.

    I could maybe post some code on monday because i'm currently in vacation, but there might be some examples out there.


    Peter Stapf - Doeres AG - My blog:

    • Edited by Peter_Stapf Friday, October 4, 2013 7:28 AM
    Friday, October 4, 2013 7:28 AM
  • Have you reached out to your MCS contact about this? I know there's a generate unique values activity in there.

    Thanks, Brian

    Friday, October 4, 2013 5:06 PM
  • Yes. We already have generate unique value activity but it doesn't have regex option. We have R2. I was looking at Carol's one of the old threads and that one had a regex option.  I am not sure that was depreciated with R2.
    Friday, October 4, 2013 5:50 PM