Auto Generate "Password" and "User name" In CRM 2015 RRS feed

  • Question

  • Hi,

        I am new in CRM 15, I want to create a plugin which generate user name and password, I have custom fields of "User name" and "Password" in Account Entity, there is a option set field with two options yes or no if option is yes then generate a username and password for Account on create.

    can anyone help?


    Thursday, July 30, 2015 1:29 PM

All replies

  • Hello,

    I would suggest to download SDK for Dynamics CRM and start from there. SDK contains a lot of samples like following - https://msdn.microsoft.com/en-us/library/gg594416.aspx?f=255&MSPPError=-2147217396

    Dynamics CRM MVP
    My blog

    Thursday, July 30, 2015 1:36 PM
  • Hi , 

    You can use Auto Number solution For User Name Creation . And for Random Password generation you can use the bellow link reference.



    Friday, July 31, 2015 6:33 AM
  • Hi,

    As other's have already indicated, you could look at the 2015 SDK to generate a plugin. (see https://msdn.microsoft.com/en-us/library/gg328515.aspx)

    One of the logical challenges you might have (with your 2 option set values) is whether MS CRM knows when you wish for it to fire the plugin. Will you fire this only on 'create'? What if you wish to recreate the password? Personally I would create a workflow plugin and allow for it to be manually fired as well as fired when the option set is changed.

    You would also logically have an issue with generating a user friendly username. i.e. 'ZX634' might not be a great username. Another danger is that you might generate a 'rude' username (i.e. one offensive in Italian, but innocent in English). As your username is going to be related to the account, you might want to generate it based on the first X digits of the account name plus some random chars thereafter.

    The password could simply be a group of random chars (as already stated)

    Karlo Swart Ver206
    V206 Mail

    Friday, July 31, 2015 1:50 PM