Password controls on CRM entity forms in a supported way…

Password controls, struggles most of us, specially when that need to be done on CRM form in a supported way. There are many solutions for this with unsupported customization and by playing with Jquery to DOM.

But in an attempt to look closer on how forms are rendered/managed, I came across a formXML tag which can do the magic and since this is a SDK documented thing, I can think about no reason to consider it un-supported! In formXML ,we can make a use of <IsPassword> tag to have our control behave like a password field right inside crm without JQuery – XML game.

Scroll below for detailed implementation steps –

1) Add concerned entity in a new/empty unmanaged solution (New solution is convenient because other components in solution will make it harder to locate a required control)

2) Export the solution, save .zip file and extract its content to a new folder. (Extract in a separate folder because we are going to need these files later…)

3) Open “customization.xml” file into preferred editor.

4) Locate formxml inside your entity tag.

5) Locate the exact control tag which you are interested in. It can be identified by looking at the description or name or id attributes along.

Also to locate your required control tag into big & messy formxml, simply assume the form structure in a row to column matrix/mesh.

That is how an entity form is structured. This will help you to go directly into your row of interest to find the control tag.

6) Once correct control tag is identified, add separate closing tag (</control>) for control instead of one liner close tag (/>).

Image

7) Add <IsPassword> tag from image within the control tag as shown, save the file and create .zip file again using all the exported files from STEP 2 above.

8) Import this zip file, publish customizations and you are DONE! Try typing into this attribute in your entity form so see the effect.

Happy coding !!!

Advertisements

3 thoughts on “Password controls on CRM entity forms in a supported way…

  1. Hi,
    first of all: thx for your article.
    I have tried with CRM 2013 on premise and it’s working … almost. When the screen is opened the control already shows ****** (good!) but then something happens and it turns into a normal text field (bad).
    Do you have any idea?
    Regards
    Jochen

    • Hello,
      There is a change in behaviour & how form is loaded in CRM 2013. In CRM2013, every control you see is covered up with a HTML control on top of it to give you this changed behaviour at form level. You’ll notice that control design is changing when you click on it & after tab out from it. This is achieved in fact with a covered-up HTML control which do not support masking of characters.
      Thats the reason when a form is loaded & if this solution is applied, then first we see a normal entity attribute control which is now successfully masked, then it is covered with a HTML control to as a wrapper to have a visual diffference which CRM 2013 provides.
      So in short, above solution will only work with CRM 2011 & not on CRM 2013 although its a supported one.
      You can vote for this item on MS Connect by going here:- “https://connect.microsoft.com/dynamicssuggestions/feedback/details/813368/password-masking-doesnt-work-in-crm-2013”
      (Please note, you’ll have to add Dynamics CRM product to your dashboard before you can see this item from link).

      Thnaks,
      Rugved

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s