XrmDefinitelyTyped
XrmDefinitelyTyped copied to clipboard
Uncaught (in promise) Error: XrmQuery: Unable to properly parse function: x => x.accounts
your own example does not work:
XrmQuery.retrieveMultiple(x => x.accounts) // Tells XrmQuery to retrieve accounts
.select(x => [x.accountnumber]) // Select which attributes to retrieve, in this case just accountnumber
.filter(x => Filter.equals(x.name, "Contoso")) // Only get accounts which have a name equal to "Contoso"
.execute(accounts => {
// Do something with the retrieved accounts
console.dir(accounts);
});
dg.xrmquery.web.min.js?ver=1623372669:1 Uncaught (in promise) Error: XrmQuery: Unable to properly parse function: x => x.accounts
at d (dg.xrmquery.web.min.js?ver=1623372669:1)
at f (dg.xrmquery.web.min.js?ver=1623372669:1)
at c (dg.xrmquery.web.min.js?ver=1623372669:1)
at Function.e.Get (dg.xrmquery.web.min.js?ver=1623372669:1)
at Object.t.retrieveMultiple (dg.xrmquery.web.min.js?ver=1623372669:1)
at getRoleName (icams_common.js?ver=1623372669:54)
at icams_common.js?ver=1623372669:92
at Generator.next (
it tries to match x=>x.accounts to /function[^(](([a-zA-Z0-9_]+)[^{]{([\s\S]*)}$/m in function d(t) { var e = t.toString().match(H); if (!e) throw new Error("XrmQuery: Unable to properly parse function: " + t.toString()); return { arg: e[1], body: e[2] } }
Most likely a duplicate of #36.
yes, it is duplicate of #36 as it expects ES5 function keyword instead of ES6 arrow.
Is support for ES6 planned in the future? I would like to use async/await feature and transpile to ES6 instead of ES5.
Our time is limited, so I can not say when XDT supports ES6, but we would love a PR that adds support for it
Our time is limited, so I can not say when XDT supports ES6, but we would love a PR that adds support for it
I'll like to take a stab at it, I have the stack trace based on the error. Do you have any gotchas before I get started?
Fixed in 5.5.1.
Fixed in 5.5.1.
Is it ES6 supported now?
If only - only the arrow function was added. A bit too quick on closing here, srroy.