java script how to write an asyn get function code example
Example 1: async await
async function showAvatar() {
// read
await setTimeout(resolve, 3000);
// read next 3s
}
showAvatar();
Example 2: await async
function afterPrintSave() {
Xrm.Page.data.save().then(
function () {
resolve();
},
function (err) {
resolve(alert(err.message));
}
);
}