Dynamics CRM trick to temporarily unlock locked fields on a form for editing

Dynamics CRM trick to temporarily unlock locked fields on a form for editing:

Ever wanted to unlock locked fields on CRM form for testing and had to edit the form. This is time consuming.

The following CRM trick will let you edit all of the locked fields with one click of a button.

All you have to do is create a bookmark on your browser and paste the following JavaScript in the URL section of the bookmark:

javascript:$(“iframe”).filter(function () { return ($(this).css(‘visibility’) == ‘visible’) })[0].contentWindow.Xrm.Page.ui.controls.forEach(function(c, i){if (c && c.setDisabled) {c.setDisabled(false);}});$(“iframe”).filter(function () { return ($(this).css(‘visibility’) == ‘visible’) })[0].contentWindow.Xrm.Page.data.entity.attributes.forEach(function(c, i){if (c && c.setSubmitMode) {c.setSubmitMode(‘always’);}});

bookmark

Steps are given below:

  1. Open any web page (google.com will do) and create a new bookmark. Name it “CRM Trick” and save.
  2. Open the bookmarks section of the browser and right click on the “CRM Trick” bookmark to edit (In IE you will have to go to properties, in Chrome you will need to edit the bookmark)
  3. Paste the above mentioned JavaScript in the URL section of the book mark and save.
  4. Now you can open your CRM page where the fields are locked and then click on the bookmark “CRM Trick”. This will unlock all of the fields and you can now edit them.

 

 

 

1,134 total views, 1 views today

About Author

Ricky Saini

Ricky Saini
Dynamics CRM, SharePoint, Office 365, Windows Azure and .Net Architect/Consultant/Freelancer in Australia ( Melbourne, Sydney and Canberra)

Leave a Comment