microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
796 stars 622 forks source link

[EventRequest] Report 990000075 Detailed Calculation OnAfterGetRecordProdBOMLineLevelSetFilters" and "OnPreDataitemSetProdBOMLineLevelFilters #26156

Closed ttaeufer closed 7 months ago

ttaeufer commented 8 months ago

Describe the request

Could we please have 2 new publisher ???OnAfterGetRecordProdBOMLineLevelSetFilters??? in OnAfterGetRecord Trigger and ???OnPreDataitemSetProdBOMLineLevelFilters??? in ???OnPreDataitem??? Trigger from Dataitem ???BOMComponentLine??? in ???Report 99000756 "Detailed Calculation"?

dataitem(BOMComponentLine; "Integer") { DataItemTableView = sorting(Number); MaxIteration = 1; column(ProdBOMLineLevelType; Format(ProdBOMLine[Level].Type)) { } column(ProdBOMLineLevelNo; ProdBOMLine[Level]."No.") { } column(ProdBOMLineLevelDesc; ProdBOMLine[Level].Description) { } column(ProdBOMLineLevelQty; ProdBOMLine[Level].Quantity) { } column(UnitCost_CompItem; CompItem."Unit Cost") { AutoFormatType = 2; DecimalPlaces = 2 : 5; } column(CostTotal; CostTotal) { AutoFormatType = 1; } column(BaseUOM_CompItem; CompItem."Base Unit of Measure") { } column(ShowLine; ProdBOMLine[Level].Type = ProdBOMLine[Level].Type::Item) { } }

            trigger OnAfterGetRecord()
            var
                UOMFactor: Decimal;
            begin
                CostTotal := 0;

                while ProdBOMLine[Level].Next() = 0 do begin
                    Level := Level - 1;
                    if Level < 1 then
                        CurrReport.Break();
                    ProdBOMLine[Level].SetRange("Production BOM No.", PBOMNoList[Level]);
                    ProdBOMLine[Level].SetRange("Version Code", PBOMVersionCode[Level]);

               *** Start new code ***
    OnAfterGetRecordProdBOMLineLevelSetFilters(ProdBOMLine[Level],Level)
        *** Stop new code ***  

    NextLevel := Level;
                  Clear(CompItem);

                if Level = 1 then
                    UOMFactor :=
                      UOMMgt.GetQtyPerUnitOfMeasure(
        Item, 
        VersionMgt.GetBOMUnitOfMeasure(PBOMNoList[Level],
        PBOMVersionCode[Level]))
                else
                    UOMFactor := 1;

                CompItemQtyBase :=
                  CostCalcMgt.CalcCompItemQtyBase(ProdBOMLine[Level],
                CalculateDate, Quantity[Level],
                Item."Routing No.", Level = 1) / UOMFactor;
    ??? 

         trigger OnPreDataItem()
                begin

    if Item."Production BOM No." = '' then
                    CurrReport.Break();

                Level := 1;

                ProdBOMHeader.Get(PBOMNoList[Level]);

                Clear(ProdBOMLine);
                ProdBOMLine[Level].SetRange("Production BOM No.", PBOMNoList[Level]);
                ProdBOMLine[Level].SetRange("Version Code", PBOMVersionCode[Level]);
                ProdBOMLine[Level].SetFilter("Starting Date", '%1|..%2', 0D, CalculateDate);
                ProdBOMLine[Level].SetFilter("Ending Date", '%1|%2..', 0D, CalculateDate);

               *** Start new code ***
    OnPreDataitemSetProdBOMLineLevelFilters(ProdBOMLine[Level],Level)
        *** Stop new code ***  

                Quantity[Level] := CostCalcMgt.CalcQtyAdjdForBOMScrap(Item."Lot Size", Item."Scrap %");

                InBOM := true;
            end;

Start new code

[IntegrationEvent(false, false)] local procedure OnAfterGetRecordProdBOMLineLevelSetFilters ( var ProdBOMLine: array[99] of Record "Production BOM Line"; var Level: Integer) begin end;

[IntegrationEvent(false, false)] local procedure OnPreDataitemSetProdBOMLineLevelFilters ( var ProdBOMLine: array[99] of Record "Production BOM Line"; var Level: Integer) begin end;

Stop new code

Additional context

We need this Publisher to set a Filter to ???Production BOM Line". Internal work item: AB#521594

AleksandricMarko commented 8 months ago

hello @ttaeufer

Related to a "OnAfterGetRecordProdBOMLineLevelSetFilters" publisher, do you:

image

ttaeufer commented 8 months ago

Hello Marko

My answer's in red:

Freundliche Grüße / Best regards

i.A. Thomas Täufer Product Manager

KUMAVISION AG Oberfischbach 3, 88677 Markdorf, Germany Tel: +49 7544 966-223 Mobil: +49 171 7668287 E-Mail @.**@.> http://www.kumavision.comhttp://www.kumavision.com/

Von: Marko Aleksandric @.> Gesendet: Freitag, 22. März 2024 16:45 An: microsoft/ALAppExtensions @.> Cc: Täufer, Thomas @.>; Mention @.> Betreff: Re: [microsoft/ALAppExtensions] [EventRequest] Report 990000075 Detailed Calculation OnAfterGetRecordProdBOMLineLevelSetFilters" and "OnPreDataitemSetProdBOMLineLevelFilters (Issue #26156)

hello @ttaeuferhttps://github.com/ttaeufer

Related to a "OnAfterGetRecordProdBOMLineLevelSetFilters" publisher, do you:

image.png (view on web)https://github.com/microsoft/ALAppExtensions/assets/133204513/85ff93c2-04a6-4bc6-8706-9a099e40acc6

- Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ALAppExtensions/issues/26156#issuecomment-2015374439, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK5MPPWK2YWWP5WJ2RAF2SLYZRGYHAVCNFSM6AAAAABFBC26F2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJVGM3TINBTHE. You are receiving this because you were mentioned.Message ID: @.**@.>>

[KUMAVISION: Auszeichnung als führender Partner für Microsoft Dynamics 365] https://kumavision.com/isg-provider-lens

Hauptsitz: KUMAVISION AG Oberfischbach 3 88677 Markdorf * www.kumavision.comhttps://kumavision.com/

Amtsgericht Freiburg HRB 581134 Vorstand: Kay von Wilcken (Vorsitzender), Helmut Rabanser, Matthias Sartor * AR-Vorsitzender: Dr.-Ing. Roy Walter

Wir nehmen den Schutz Ihrer persönlichen Daten sehr ernst. Erfahren Sie mehr darüber, wie wir mit Ihren personenbezogenen Daten umgehen: Informationspflichtenhttps://kumavision.com/informationspflichten | We do take the protection of your personal data very seriously. Read more here: Information Obligationhttps://kumavision.com/processing-of-customer-prospects-supplier-data

Bitte beachten Sie auch unsere Allgemeinen Geschäftsbedingungen: AGBhttps://kumavision.com/images/kumavision/impressum/allgemeine-geschaeftsbedingungen-kumavision.pdf | Please also note our general terms and conditions: GTChttps://kumavision.com/images/kumavision/impressum/terms-and-conditions-kumavision-de.pdf

JesperSchulz commented 7 months ago

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 18286.