Wednesday, 27 May 2020

AX365 Retail Show a dialog

This is my first example to create a dialog box
==============================================
        /////////////////////////////Hesham code added///////////////////////////////////////
       // window.open('https://javascript.info/')

        let yesButton: ClientEntities.Dialogs.IDialogResultButton = {

            id: "YES_ID",
            label: "Yes", // "Yes"

            result: "Yes"
        };

        let noButton: ClientEntities.Dialogs.IDialogResultButton = {
            id: "NO_ID",
            label: "No", // "No"
            result: "No"
        };

        let showMessageDialogClientRequestOptions: ClientEntities.Dialogs.IMessageDialogOptions = {
            title: "My Title",
            subTitle: "my Subtitle",
            message: "The message ?",
            button1: yesButton,
            button2: noButton

        };

        let showMessageDialogClientRequest: ShowMessageDialogClientRequest<ShowMessageDialogClientResponse> =
        new ShowMessageDialogClientRequest(showMessageDialogClientRequestOptions);
         this.context.runtime.executeAsync<ShowMessageDialogClientResponse>(showMessageDialogClientRequest);
        //////////////////////////////////////////////////

No comments:

Post a Comment