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();
formContext.getControl("description").setDisabled(false);
},
}
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 !
Related posts:

How an Australian Linen Company Made Quote Approvals Secure with One Time Links in Dynamics 365

Recovering Lost Approval History After a Purchase Order Deletion in Business Central

How an Abu Dhabi-Based Diversified Holding Company Simplified Intercompany Transactions in Dynamics ...

