0

In Dynamics CRM 2016, I am able to pass some parameters to the other form using query string but I am unable to check if a particular element is exist in query. I tried using indexOf for check index, includes to varify if element is exist but I cannot made a way through. I would like to hear from experts to get the length or if an element is exist in query string parameter.

function getQueryStringLength()
{
    var param = Xrm.Page.context.getQueryStringParameters();
    var chkElem = param.includes("new_orderid");
    alert(chkElem);
}
1

1 Answer 1

1

If indexOf returns -1 if substring is not found. Otherwise it will return array index where substring started. Not sure why you did not succeed.

if(str.indexOf(substr) > -1)
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.