Hello,
I am trying to have a template for JS file. I have a lot of functions I want to run on load, change, and Save. I have created the below I am getting error message "executionContext Undefined at hideShow". Thank you for the help.
// JavaScript source code
if (typeof DEMO == "undefined") {
DEMO = { __namespace: true };
}
DEMO.Case = (function () {
var $self = {};
var formContext = executionContext.getFormContext();
//debugger;
//onLoad
$self.onLoad = function () {
// var formContext = executionContext.getFormContext();
hideShow(executionContext);
}
//onSave
$self.onSave = function () {
//LoadFormContext(formContext);
}
//OnChange Events
$self.OnChange = function () {
//LoadFormContext(formContext);
hideShow(executionContext);
}
function hideShow() {
var formContext = executionContext.getFormContext();
if (formContext.getAttribute("fieldName").getValue() == "") {
formContext.ui.tabs.get("tabName").setVisible(false);
}
else
formContext.ui.tabs.get("tabName").setVisible(true);
}
return $self;
})();





