I have some code written that when the field 'Corporate Tracker Type' = Yes, show the associated Grid, else Hide. Here is the code I am using:
function ShowHideTTTGrid(context) {
var formContext = context.getFormContext();
var CorporateTrackerType = formContext.getAttribute("lennar_corporatetrackertype").getValue();
var docTab = formContext.ui.tabs.get("{67f21f51-420e-4b0b-ab79-a45d7595ad48}");
if (CorporateTrackerType != true) {
docTab.sections.get('{65e87d15-fb83-4a40-b449-7cf6fdad0706}').setVisible(true);
} else {
docTab.sections.get('{65e87d15-fb83-4a40-b449-7cf6fdad0706}').setVisible(false);
}
}
Does this code look correct? I am getting the following error:
ReferenceError: Web resource method does not exist: ShowHideTTTGrid
at Dp.execute (lennardev.crm.dynamics.com/.../app.js
at wp._executeIndividualEvent (lennardev.crm.dynamics.com/.../app.js
at wp._executeEventHandler (lennardev.crm.dynamics.com/.../app.js
at Object.execute (lennardev.crm.dynamics.com/.../app.js
at C._executeSyncAction (lennardev.crm.dynamics.com/.../app.js
at C._executeSync (lennardev.crm.dynamics.com/.../app.js
at C.executeAction (lennardev.crm.dynamics.com/.../app.js
at t.dispatch (lennardev.crm.dynamics.com/.../app.js
at Object.dispatch (lennardev.crm.dynamics.com/.../app.js
at Object.dispatch (https://lennardev.crm.dynamics.com/uclient/scripts/app.js?v=1.3.303-1911.4:585:5034)
In the Form Properties, I have the function Control Form Event OnLoad and Control Corporate Tracker Type Event OnChange.
Thanks for any suggestions!