Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown not validating selecting value when opening page from OnDrillDown #7668

Closed
auzhhv opened this issue Feb 15, 2024 · 1 comment
Closed

Comments

@auzhhv
Copy link

auzhhv commented Feb 15, 2024

Please include the following with each issue:

1. Describe the bug
I have a procedure that shows a page.
The procedure is used from OnAction on a action and from OnDrillDown on a field.
The page as a group before the repeater. The group has a field that is a variabel.
The variabel has a tablerelation.
When using the action to open the page, and using the dropdown menu to select a value, it works fine.
The value is placed in the field and the OnValidate trigger for the field is ran.
But when clicking the field (OnDrillDown) to open the page, I'm not able to select a value from the dropdown menu.
I can see all the values and select one. But when I click it, it is not placed in the field, and the OnValidate is not ran.
And I can manually enter a value into the field and it works.
If I change the PageType from List to Worksheet it works as expected.

2. To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'

This works fine:

            action(ViewDetails)
            {
                Caption = 'View Details';
                Image = ViewDetails;
                ApplicationArea = All;
                ToolTip = 'View details about the selected line.';
                Scope = Repeater;

                trigger OnAction()
                begin
                    ShowDetails();
                end;
            }

This does not work as expected (field in the repeater):

                field("No. of Lines"; Rec."No. of Lines")
                {
                    ApplicationArea = All;
                    ToolTip = 'Specifies the number of production order, sales order and transfer order lines associated with the route.';
                    BlankZero = true;

                    trigger OnDrillDown()
                    begin
                        ShowDetails();
                    end;
                }

The procedure that runs the page:

    local procedure ShowDetails()
    var
        RoutingDetails: Page "AUZ Routing Details";
    begin
        RoutingDetails.Initialize(Rec, LocationFilter);
        RoutingDetails.Run();
    end;

This field is placed in a group before the repeater on the list page that is ran:

                field(DepartureCode; DepartureCode)
                {
                    Caption = 'Departure Code';
                    ApplicationArea = All;
                    TableRelation = "AUZ Departure";
                    ToolTip = 'Specifies the departure code for the shipment date and shipping agent.';
                    Editable = DepartureCodeEditable;

                    trigger OnValidate()
                    begin
                        SalesDepartureMgt.UpdateSalesLineDepartureCode(DepartureCode, GlobalRoutingBuffer."Shipment Date", GlobalShippingAgentCode);
                    end;
                }

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior
I expect to be able to use de dropdown menu regardless of how the ShowDetailes procedure is ran.

4. Actual behavior
When clicking on the value i expect it to be selected and placed into the field:
image
As so:
image
But when I click it, no value is selected, as so:
image

5. Versions:

  • AL Language:
  • Visual Studio Code: 1.86.1
  • Business Central: SE Business Central 23.4 (Platform 23.0.16180.0 + Application 23.4.15643.15715)
  • List of Visual Studio Code extensions that you have installed:

Final Checklist

Please remember to do the following:

  • [X ] Search the issue repository to ensure you are reporting a new issue

  • [X ] Reproduce the issue after disabling all extensions except the AL Language extension

  • [X ] Simplify your code around the issue to better isolate the problem

@SBalslev
Copy link
Contributor

Let's get the issue to a team who will fix and backport it, as this repository is only for issues related to the AL compiler in latest developer preview environment for Dynamics 365 Business Central. We suggest that you open a support case or file a bug in Collaborate, to ensure that all Business Central users benefit from your catch as soon as possible.

The suggestion is to try to use a worksheet page. If that doesn't work, create a support request.

To open a support case, you can:

  • Open a support request to CSS through the PartnerSource portal
  • Contact your Service Account Manager (SAM) in your local subsidiary to understand what is included in your contract as of support incident and PAH (Partner Advisory Hours). Your SAM might also direct you "step by step" how to open a support request or how to get credentials, if this is the first time for you or your company

If you file the bug in Collaborate, remember to include steps to reproduce the issue, and the Business Central build number and country version you're using.

@SBalslev SBalslev closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants