i need a script to remove mandatory field *
*This post is locked for comments
i need a script to remove mandatory field *
*This post is locked for comments
Hi,
you could also achieve it with a business rule if you are not a dev
Here is an example:
Hi,
You may need to remove required level of field as below:
var AddressType = Xrm.Page.data.entity.attributes.get("address1_addresstypecode");
AddressType.setRequiredLevel("required");
Hope this helps :)
Hi.
To set business required:
Xrm.Page.getAttribute("new_field").setRequiredLevel("required");
To set optional:
Xrm.Page.getAttribute("new_field").setRequiredLevel("none");
Kind regards,
Karsten
Hello,
You can use below :
function abc()
{
if (a=b)
{
Xrm.Page.getAttribute("new_myfield").setRequiredLevel("none");
}
else
{
Xrm.Page.getAttribute("new_myfield").setRequiredLevel("required");
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156