Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

How does one use a variable in a webapi filter?

$
0
0

Error message: Syntax error at position 22 in 'msdyn_name eq CA-90028'.

Script: 

        if (formContext.getAttribute("shipto_postalcode").getValue() && formContext.getAttribute("shipto_stateorprovince").getValue()) {
            var taxGroupName = formContext.getAttribute("shipto_stateorprovince").getValue() + "-" + formContext.getAttribute("shipto_postalcode").getValue();
            alert(taxGroupName);

            Xrm.WebApi.retrieveMultipleRecords("msdyn_taxgroup", "?$select=msdyn_name&$filter=msdyn_name eq " + taxGroupName).then(

or am I making some simpler syntax error?

TIA


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images