Hi all,
Quick question. With javascript web resources. Is it possible to use an async function as opposed to the traditional function we've all been using?
So instead of:
function sampleFunctionOne(executionContext) {
var formContext = executionContext.getFormContext();
console.log(formContext.data.entity.getId())
}
I want to write it like this:
async function sampleFunctionTwo(executionContext) {
var formContext = executionContext.getFormContext();
console.log(formContext.data.entity.getId());
}
Obviously in the second code snippet I didn't call any async functions or use the await syntax but I just wanted to know whether we can use it? Can we add it as per normal to a Dynamics 365 form say on load and call the function the same way as sample function one?
Kind regards,
Mike