Skip to main content

Dynamics V9 Show/Hide Webresources

Quick reusable JavaScript for showing or hiding webresource on a form based on a field value. For example show a disability flag image when a check box is checked.

Robert Peledie also describes a very usable scenario this and in more detail over at his blog.

function disability (executionContext) {
var formContext = executionContext.getFormContext();
var disability = formContext.getAttribute("new_disability").getValue();
if (disability === true) {
else {

Don’t forget to pass the execution context to the script!

Charles Osei

Dynamics 365 Consultant @ Hitachi MCSE Business Applications Computer Science – University of Lincoln 2017 Nottingham D365/CRM user group Chapter Leader TDG – Community leader Twitter @charlied3v LinedIn

Leave a Reply