I Need Coffee - Episode 122 - Weekly BC Review!

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024

Комментарии • 4

  • @klauskaan6320
    @klauskaan6320 5 месяцев назад

    PTE artifacts from pipeline should just be deployed to the tenant once it has been build.

  • @ant1d0te
    @ant1d0te 5 месяцев назад

    Is Thursday Sales Invoice Import Challenge need to be non-coding? or small AL file for tiny PTE would work too?

    • @ant1d0te
      @ant1d0te 5 месяцев назад

      if code is ok, then here it is: no foolproof, simple import based on the design
      pageextension 50000 "CSV Sales Invoice List" extends "Sales Invoice List"
      { actions { addlast(processing) { action("CSV ImportFromCSV") {
      ApplicationArea = All;
      Caption = 'Import From CSV';
      Image = Import;
      ToolTip = 'Import Sales Invoice';
      trigger OnAction()
      var
      SH: Record "Sales Header";
      SL: Record "Sales Line";
      CSVB: Record "CSV Buffer";
      InS: InStream;
      i, LineNo: Integer;
      DateVal: Date;
      DecVal: Decimal;
      begin
      if not UploadIntoStream('Select CSV File', InS) then exit;
      CSVB.LoadDataFromStream(InS, ',');
      for i := 2 to CSVB.GetNumberOfLines() do begin // Skip header
      if CSVB.GetValue(i, 2) SH."External Document No." then begin
      SH.Init();
      SH.Validate("Document Type", SH."Document Type"::Invoice);
      SH.Insert(true);
      SH.Validate("Sell-to Customer No.", CSVB.GetValue(i, 1)); // Customer
      SH.Validate("External Document No.", CSVB.GetValue(i, 2)); // InvoiceNo
      Evaluate(DateVal, CSVB.GetValue(i, 3)); // Date
      SH.Validate("Document Date", DateVal);
      SH.Modify(true);
      LineNo := 0;
      end;
      LineNo += 10000;
      SL.Init();
      SL.Validate("Document Type", SH."Document Type");
      SL.Validate("Document No.", SH."No.");
      SL.Validate("Line No.", LineNo);
      SL.Insert(true);
      SL.Validate(Type, SL.Type::Item);
      SL.Validate("No.", CSVB.GetValue(i, 4)); // Item
      Evaluate(DecVal, CSVB.GetValue(i, 5)); // Qty
      SL.Validate("Quantity", DecVal);
      Evaluate(DecVal, CSVB.GetValue(i, 6)); // Unit Price
      SL.Validate("Unit Price", DecVal);
      SL.Modify(true);
      end;
      end; } } addlast(Category_Process) { actionref("CSV ImportFromCSV_Promoted"; "CSV ImportFromCSV") { } } } }

    • @SteveEndow
      @SteveEndow  5 месяцев назад

      If there is a simple PTE solution, that might work. On Twitter, Shannon noted that she typically develops an XMLPort for simple integrations.