ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Business Central is Crashing when running Left Outer Join Query is accessed

Open Rama-M opened this issue 6 years ago • 2 comments

Business central is crashing when running the following code to access Left Outer Join Query Object.

local procedure UnMatchRunQuery()
var
    TestQuery: Query UnMatchQuery;
begin
    // Overide the TopNumberOfRows property and returns the first 10 rows in the dataset
    //TestQuery.TOPNUMBEROFROWS(10);

    TestQuery.SETRANGE(DocumentNo, '');  //Overide filters
    MESSAGE(TestQuery.GETFILTERS);

    IF TestQuery.OPEN THEN BEGIN
        // Reads each row of the dataset
        WHILE TestQuery.READ DO BEGIN
            MESSAGE(StrSubstNo('%1 ---> %2', TestQuery.DocumentType, TestQuery.DocumentNo));
        END;
        TestQuery.CLOSE;
    end;
end;

query 77001 UnMatchQuery { QueryType = Normal;

elements
{
    dataitem(SalesHeader; "Sales Header")
    {
        column(DocumentType; "Document Type")
        {
        }
        column(No; "No.")
        {
        }
        column(SelltoCustomerNo; "Sell-to Customer No.")
        {
        }

        dataitem(SalesLine; "Sales Line")
        {
            DataItemLink = "Document Type" = SalesHeader."Document Type", "Document No." = SalesHeader."No.";
            filter("DocumentNo"; "Document No.")
            {
            }
        }
    }
}

trigger OnBeforeOpen()
begin

end;

}

Rama-M avatar Jan 16 '20 14:01 Rama-M

We do not process hot fix requests here, please contact technical support to create hot fix request.

AlexanderYakunin avatar Jan 16 '20 14:01 AlexanderYakunin

Hi Alex, can you please advise the web link to report this to Microsoft Support

Rama-M avatar Jan 16 '20 18:01 Rama-M