AL icon indicating copy to clipboard operation
AL copied to clipboard

Dialog Data Type - Dialog not showing up

Open RasmusTidselbak opened this issue 9 years ago • 7 comments

I'm trying to create a dialog from a page, but the dialog never show up. I have created a new page and opened the page directly, then I copy/pasted the example from the How to: Create a Progress Window guide. Now when I click the button to start the dialog, I get nothing but the little spinner on my curser, telling me something is happening.

Is this not working or is it not supposed to work on all types of pages in the webclient?

RasmusTidselbak avatar Aug 17 '17 08:08 RasmusTidselbak

Is this what are you trying to run? Is the ProgressWindow a global variable?

page 70000009 MyAwesomePage
{
    PageType = Card;

    actions
    {
        area(processing)
        {
            action(ActionName)
            {
                trigger OnAction();
                begin
                    ProgressWindow.OPEN('Processing account number #1#######');
                    REPEAT
                        SLEEP(1);
                        ProgressWindow.UPDATE(1,ChartOfAcc."No.");
                    // Process the account.
                    UNTIL ChartOfAcc.NEXT = 0;
                    ProgressWindow.CLOSE;
                end;
            }
        }
    }
    
    var
        ProgressWindow : Dialog;
        ChartOfAcc : Record "G/L Account";
}

atoader avatar Aug 17 '17 13:08 atoader

This is what I have done. 2017-08-17_15-37-46

RasmusTidselbak avatar Aug 17 '17 13:08 RasmusTidselbak

Try making it a global variable. The runtime might now support it as a local variable. image

atoader avatar Aug 17 '17 13:08 atoader

That did it, thanks 👍

RasmusTidselbak avatar Aug 17 '17 13:08 RasmusTidselbak

Actually I just tested with the local variable instead. It seems that the dialog doesn't show up right away and there might be a 3-5 second delay, I was not aware of, before anything is shown for the user.

RasmusTidselbak avatar Aug 17 '17 14:08 RasmusTidselbak

I just tried this in our extension, and I can't get it to Work. Only thing happens is the little spinner on my cursor, telling me something is happening.

What am I doing wrong ? or does this still not Work.

AMCJN avatar Aug 29 '17 12:08 AMCJN

Sorry it does Work, but it takes a LONG time for the Dialog to show. Will have to make som other solution.

AMCJN avatar Aug 29 '17 12:08 AMCJN