Wednesday, 20 November 2024

CRM 365 Cloud - Open Form in new window or the same window with Typescript

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

CRM 365 Cloud - Disassociate 2 records using typescript

In case you need to Disassociate 2 records, please find below the code that allows you to do that.      export async function DissociateE...