Reputation: 4623
My following function encountered the following error when triggered in Dynamics
form.
ReferenceError: heightStart is not defined
function Start(type) {
debugger;
alert("Start | type: " + type);
if (type == "heightStart") {
var height = Xrm.Page.getAttribute("ccc_heightincmstart").getValue();
if (height != null && height != "") {
GetChildInfo(height, type);
}
else {
Xrm.Page.getAttribute("ccc_heightpercentilestart").setValue("");
}
}
}
May I know how can I fix this error?
type
is a value passed in with Web Resource File Handler mapping.
Upvotes: 0
Views: 930
Reputation: 131
because you pass the executioncontext so the function should be
function(executioncontext, type) ....
Upvotes: 0
Reputation: 22836
You have to pass parameter with double quotes like “heightStart”
Upvotes: 1
Reputation: 171
It appears that the Parameter
form is interpreting heightStart as a variable. Try wrapping it in quotes in the form; "heightStart"
Upvotes: 1