Please find below the code for opening a form in Typescript.
export function OpenForm(entityName: string, entityId : string, openInNewWindow : boolean) {
let entityFormOptions = {
entityName: entityName,
entityId: entityId,
openInNewWindow: openInNewWindow
};
// Open the form.
Xrm.Navigation.openForm(entityFormOptions).then(
function (success) {
console.log(success);
},
function (error) {
console.log(error);
});
}
Hope it helps.
No comments:
Post a Comment