AL icon indicating copy to clipboard operation
AL copied to clipboard

Progress Dialog not shown in WebClient

Open andreilungu opened this issue 8 years ago • 3 comments

NAV 2018 CU1 Webclient. Dialog is not displayed in Webclient, It displays correctly in Windows Client

To help us reproduce the issue and find the root please try to: A) Attach a minimal set of AL code that causes the issue procedure FillRealRecWithRandomNumbers(NumberOfValuesWanted : Integer; RandomSelectionMaxNumber : Integer) var i : integer; ListOfInt : List Of [Integer]; RandomNumbers : Record RandomNumbers; intprimarykey : Integer; randomposition : integer; RemainedRandomNumbers : Integer; ProgressWindow : Dialog; begin If NOT RandomNumbers.IsEmpty then Exit; //values already were added at a previous run

    //add values to List
    for i := 1 to RandomSelectionMaxNumber do
            ListOfInt.Add(i);
        
    ProgressWindow.Open('Creating Random Nos @1@@@@@@@@@');
    RemainedRandomNumbers := RandomSelectionMaxNumber;
    //select random values from List and add to RandomNumbers. Then delete the added number from ListOfInt
    for i := 1 to NumberOfValuesWanted do begin
        ProgressWindow.UPDATE(1,ROUND(i /  NumberOfValuesWanted * 10000,1));
        
        randomposition := random(RemainedRandomNumbers); //get a random position

        //add value to RandomNumbers
        RandomNumbers.PrimaryKey := intprimarykey;
        RandomNumbers.RandomNumber := ListOfInt.Get(randomposition);
        RandomNumbers.Insert;
        intprimarykey += 1;
    
        //detele value from ListOfInt to have only unique random numbers
        ListOfInt.RemoveAt(randomposition);

        RemainedRandomNumbers -= 1;
        If RemainedRandomNumbers = 0 THEN //in case someone inputs more wanted values than the RandomNumbers
            break;
    end;
    ProgressWindow.Close;
end;

andreilungu avatar Mar 03 '18 15:03 andreilungu

Hi @andreilungu, I have just verified that it works by following the example from here: How to: Create a Progress Window

page 50100 DialogTesting
{
    PageType = Card;
    actions
    {
        area(processing)
        {
            action(OpenDialog)
            {
                trigger OnAction()
                var
                    ProgressWindow: Dialog;
                    ChartOfAcc: record "G/L Account";
                begin
                    ProgressWindow.OPEN('Processing account number #1#######');
                    REPEAT
                        SLEEP(1000);
                        ProgressWindow.UPDATE(1, ChartOfAcc."No.");
                    UNTIL ChartOfAcc.NEXT = 0;
                    ProgressWindow.CLOSE;
                end;
            }
        }
    }
}

thpeder avatar Mar 05 '18 12:03 thpeder

I thought that not showing progress bars (or should I rather say: only the UPDATE part?) is a known feature limitation of the web client: https://docs.microsoft.com/en-us/dynamics-nav/feature-limitations-of-the-microsoft-dynamics-nav-web-client#Functions

NKarolak avatar Mar 05 '18 15:03 NKarolak

@NKarolak It was intended to do as the docs states, but until we have a better solution then it still works not to block you. Which is why the docs seems outdated.

thpeder avatar Mar 06 '18 10:03 thpeder