0

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. enter image description here

3 Answers 3

1

You have to pass parameter with double quotes like “heightStart”

enter image description here

Read more

Sign up to request clarification or add additional context in comments.

Comments

1

It appears that the Parameter form is interpreting heightStart as a variable. Try wrapping it in quotes in the form; "heightStart"

Comments

0

because you pass the executioncontext so the function should be

function(executioncontext, type) ....

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.