Disable field on change of tab in D365 CE

Use case – Our requirement is to enable field description field on invoice line form on clicking of tab General.

Let’s see how we can achieve this

Solution –

Step 1 – Create web resource with below function-

 var invoiceLineCustomization =
     unlockField : function(executionContext)
         var formContext = executionContext.getFormContext(); 

Step 2: Add this web resource on tab property event TabStateChange and try.

(path to go to event tab – Click on tab -> change properties -> event)

Output –

Hope this helps !

Share Story :