[IT][Event Request][Codeunit][12173] "Vendor Bill List - Post" - Function PostVendorBillLine() & Function PostBalanceAccount()
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 66/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend
Direzione di ricerca
Apri il codeunit 12173 "Vendor Bill List - Post" e individua le procedure PostVendorBillLine() e PostBalanceAccount(). Aggiungi le due dichiarazioni [IntegrationEvent(false, false)] esattamente come indicato nell'issue, introduci la variabile IsHandled e racchiudi il blocco di inizializzazione di Gen. Journal Line in if not IsHandled then begin ... end; mantenendo gli eventi OnBefore* esistenti e le chiamate a GenJnlPostLine.RunWithCheck al di fuori del guard. È completato quando il pacchetto AL compila e i nuovi eventi sono richiamabili da un'estensione; nota che si tratta di un repository di proprietà di Microsoft in cui le richieste di estensibilità vengono triaggiate, quindi conferma che i maintainer accettino la modifica prima di investire.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Why do you need this change?
Hello,
We would need new events in the "PostVendorBillLine" and "PostBalanceAccount" procedures of Codeunit 12173 "Vendor Bill List - Post", in order to manage custom fields.
New Events and Code:
procedure PostVendorBillLine(var GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill; var AmountLCY: Decimal)
var
Tax: Option " ",Withhold,"Free Lance",Company;
//New Variable
IsHandled: Boolean;
begin
GenJnlLine.Init();
//New Code
IsHandled:=False;
OnAfterInitGenJnlLineOnPostVendorBillLine(GenJnlLine,VendorBillHeader,VendorBillLine,VendLedgEntry,Bill,AmountLCY,IsHandled);
if not IsHandled then begin
//
GenJnlLine.Validate("Posting Date", VendorBillHeader."Posting Date");
GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment;
GenJnlLine."Document No." := VendorBillHeader."Vendor Bill List No.";
GenJnlLine."Document Date" := VendorBillHeader."List Date";
GenJnlLine."Account Type" := GenJnlLine."Account Type"::Vendor;
GenJnlLine.Validate("Account No.", VendorBillLine."Vendor No.");
GenJnlLine."Due Date" := VendorBillLine."Due Date";
GenJnlLine."External Document No." := VendorBillLine."Vendor Bill List No.";
GenJnlLine.Validate(Amount, VendorBillLine."Amount to Pay");
GenJnlLine.Validate("Currency Code", VendorBillHeader."Currency Code");
if not VendorBillLine."Manual Line" then begin
GenJnlLine.Validate("Salespers./Purch. Code", VendLedgEntry."Purchaser Code");
ApplyInvAndUpdateLedgEntry(GenJnlLine, VendorBillLine, Tax::" ");
end else
GenJnlLine."Applies-to Occurrence No." := VendorBillLine."Document Occurrence";
GenJnlLine.Description := Bill.Description;
GenJnlLine."Source Code" := Bill."Vend. Bill Source Code";
GenJnlLine."System-Created Entry" := true;
GenJnlLine."Reason Code" := VendorBillHeader."Reason Code";
GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code";
GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code";
if not VendorBillLine."Manual Line" then
GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"
else
GenJnlLine."Dimension Set ID" := VendorBillLine."Dimension Set ID";
GenJnlLine."Payment Method Code" := VendorBillHeader."Payment Method Code";
AmountLCY := GenJnlLine."Amount (LCY)";
//New Code
end;
//
OnBeforePostVendorBillLine(GenJnlLine, VendorBillHeader, VendorBillLine, VendLedgEntry);
GenJnlPostLine.RunWithCheck(GenJnlLine);
end;
procedure PostBalanceAccount(GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill)
var
IsHandled:Boolean;
begin
GenJnlLine.Init();
//New Code
IsHandled:=False; OnAfterInitGenJnlLineOnPostBalanceAccount(GenJnlLine,VendorBillHeader,VendorBillLine,VendLedgEntry,Bill,IsHandled);
if not IsHandled then begin
//
GenJnlLine.Validate("Posting Date", VendorBillHeader."Posting Date");
GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment;
GenJnlLine."Document No." := VendorBillHeader."Vendor Bill List No.";
GenJnlLine."Document Date" := VendorBillHeader."List Date";
GenJnlLine."Account Type" := GenJnlLine."Account Type"::"Bank Account";
GenJnlLine.Validate("Account No.", VendorBillHeader."Bank Account No.");
GenJnlLine."Currency Code" := VendorBillHeader."Currency Code";
GenJnlLine.Validate(Amount, -BalanceAmount);
GenJnlLine.Validate("Amount (LCY)", -BalanceAmountLCY);
GenJnlLine.Description := Bill.Description;
GenJnlLine."Source Code" := Bill."Vend. Bill Source Code";
GenJnlLine."System-Created Entry" := true;
GenJnlLine."Reason Code" := VendorBillHeader."Reason Code";
if not VendorBillLine."Manual Line" then
GenJnlLine.Validate("Salespers./Purch. Code", VendLedgEntry."Purchaser Code");
GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code";
GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code";
if not VendorBillLine."Manual Line" then
GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"
else
GenJnlLine."Dimension Set ID" := VendorBillLine."Dimension Set ID";
//New Code
end;
//
GenJnlLine.CreateDimFromDefaultDim(GenJnlLine.FieldNo("Account No."));
OnBeforePostBalanceAccount(GenJnlLine, VendorBillHeader, VendorBillLine, VendLedgEntry);
GenJnlPostLine.RunWithCheck(GenJnlLine);
end;
Signature:
[IntegrationEvent(false, false)]
OnAfterInitGenJnlLineOnPostVendorBillLine(var GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill; var AmountLCY: Decimal;var IsHandled:Boolean)
begin
end;
[IntegrationEvent(false, false)]
OnAfterInitGenJnlLineOnPostBalanceAccount(GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill;var IsHandled:Boolean)
begin
end;
Thank You,
Luca
Describe the request
We need this events to be able to manage custom fields on the Line Insert procedures, and we need to manage the validate triggers of the fields.
This request is a follow-up to an issue opened about a year ago. The requested change has not yet been implemented in the Business Central Base Application.
For reference, please see the previous discussion: https://github.com/microsoft/ALAppExtensions/issues/29093#issuecomment-3883244614
Provide an implementation (optional)
- I will provide the implementation for this extensibility request
- Lingua principale
- AL
- Stelle
- 697
- Fork
- 473
- Merge medio
- 2g 19h
- PR unite (30g)
- 493
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/BCApps
-
missing-info Team: Finance
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
microsoft/BCApps#12900 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
missing-info Team: Finance
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/BCApps#12893 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[W1][Extensibility Request][Subscription Billing] Remove local access from InitTempTable() procedure on page 8025 "Contract Price Update"Forse già presa @business-central-extensibility-bot l’ha presa 1 giorno fa. ApertaApproved ext-ready-to-implement request-for-external Team: Finance
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/BCApps#12775 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[W1][MultiObjects] Output journal lines: event after CheckWhse in codeunits 5406 "Output Jnl.-Expl. Route" and 5510 "Production Journal Mgt"Forse già presa @PredragMaricic l’ha presa 2 giorni fa. ApertaApproved Team: SCM
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/BCApps#12652 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
"Warehouse Request" has wrong Table Relation for "Shipping Agent Service Code"Forse già presa @PredragMaricic l’ha presa 2 giorni fa. ApertaApproved Team: SCM
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
microsoft/BCApps#12623 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/BCApps
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
`/search.json` ignores the documented `editions.sort` parameterForse già presa @PranavD2905 l’ha presa oggi. ApertaAffects: Server Good First Issue Module: Solr Needs: Triage Theme: Public APIs Theme: Search
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
internetarchive/openlibrary#13989 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug P2: misleading query
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
jeffknupp/association#478 ·
-
backend bug difficulty: medium priority: medium reliability
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
trustflow-protocol/trustflow-backend#730 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
firecrawl/firecrawl-mcp-server#548 ·
I maintainer di solito rispondono entro 1 giorno