I have this error when I want to add a record to the form of my dynamics 365 and this is what I have in the script
function VisibleRiskLevelField(executionContext) { var formContext = executionContext.getFormContext(); if (formContext.getAttribute("axn_shephaseii").getValue() != null ) { formContext.getControl("axn_risklevel").setVisible(false); formContext.getAttribute("axn_risklevel").setRequiredLevel("none"); }else { DisabledField(); }}
HI Joss,Please check below highlighted in form properties.
For e.g. if VisibleRiskLevelField this function called on save of any entity then in On Save event of form the above highlighted checkbox should be checked.Thanks,Pradeep Rai.Please mark this as VERIFIED if it helps
hi pradeed thank you for the response but already did it and does not work
Hi,
Code looks good.
just wanted know, is there any other javascript function called on same entity?
Thanks.
yes, the issue was in another funtion in my script on the same entity, thanks for the help!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Rishabh Kanaskar 159
MVP-Daniyal Khaleel 152
Tom_Gioielli 134 Super User 2025 Season 2