[W1][Codeunit][6212][Sustainability Post Mgt] OnAfterInsertSustainabilityLedgerEntry event in InsertLedgerEntry
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
- 72/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github
- Ambito
- backend-api-design
Direzione di ricerca
Inizia con Codeunit 6212, «Sustainability Post Mgt», e leggi InsertLedgerEntry insieme a OnBeforeInsertSustainabilityLedgerEntry. Aggiungi l’Integration Event richiesto dopo la creazione delle relazioni con l’insert e il G/L entry, all’interno del blocco if not IsHandled, passando il ledger entry inserito e la source journal line. Il lavoro è completato quando i subscriber possono ricevere entrambi i record dopo l’inserimento, con Entry No. e SystemId della nuova voce disponibili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Why do you need this change?
Our extension creates Sustainability Journal Lines and posts them. Afterwards it needs to know which Sustainability Ledger Entry was created from which journal line. For that, at one point in time, we need the reference to the journal line together with the SystemId of the newly inserted ledger entry.
The General, Item, Job and Cost journals already provide an event that passes both the inserted entry and its source journal line:
"Gen. Jnl.-Post Line".OnAfterInsertGlobalGLEntry(var GLEntry; var TempGLEntryBuf; var NextEntryNo; GenJnlLine)"Item Jnl.-Post Line".OnAfterInsertItemLedgEntry(var ItemLedgerEntry; ItemJournalLine; ...)"Job Jnl.-Post Line".OnAfterJobLedgEntryInsert(var JobLedgerEntry; JobJournalLine)"CA Jnl.-Post Line".OnAfterCostEntryInsert(var CostEntry; CostJournalLine)
Codeunit 6212 "Sustainability Post Mgt" has no such event. InsertLedgerEntry only raises:
OnBeforeInsertSustainabilityLedgerEntry(IntegrationEvent): raised beforeInsert(true), when the entry has no Entry No. and no SystemId yet.OnInsertLedgerEntryOnBeforeInsert(InternalEvent, on main): not subscribable from other apps, and also raised before the insert.
The table's OnAfterInsertEvent has the SystemId of the new entry, but no reference to the journal line. To bring both together today, an extension has to carry the journal line reference on the ledger entry itself (an extra field in a table extension, filled in the OnBefore event) and then evaluate it in a second subscriber on the table's OnAfterInsertEvent. That is an extra field on every ledger entry only to pass information between two events.
An OnAfter event in InsertLedgerEntry that passes the inserted entry and the journal line would make this workaround unnecessary. It would also help other apps that need to link Sustainability Ledger Entries to their journal lines, in the same way as the existing events for the other journals.
Describe the request
Add an integration event in InsertLedgerEntry after the ledger entry is inserted. It is raised only when the entry was actually inserted (inside the if not IsHandled block), so the entry has its Entry No. and SystemId.
[W1][Codeunit][6212][Sustainability Post Mgt]
procedure InsertLedgerEntry(SustainabilityJnlLine: Record "Sustainability Jnl. Line")
___
Raise an event after the Sustainability Ledger Entry is inserted, with the inserted entry and the journal line it was posted from.
___
// current code
OnBeforeInsertSustainabilityLedgerEntry(SustainabilityLedgerEntry, SustainabilityJnlLine);
IsHandled := false;
OnInsertLedgerEntryOnBeforeInsert(SustainabilityLedgerEntry, IsHandled);
if not IsHandled then begin
SustainabilityLedgerEntry.Insert(true);
CreateGLEntryRelations(SustainabilityJnlLine, SustainabilityLedgerEntry."Entry No.");
OnAfterInsertSustainabilityLedgerEntry(SustainabilityLedgerEntry, SustainabilityJnlLine); // new
end;
[IntegrationEvent(false, false)]
local procedure OnAfterInsertSustainabilityLedgerEntry(var SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; SustainabilityJnlLine: Record "Sustainability Jnl. Line")
begin
end;
The name and parameters follow the existing OnBeforeInsertSustainabilityLedgerEntry in the same codeunit. Please also add the event to the latest release branch if possible.
Provide an implementation (optional)
- I will provide the implementation for this extensibility request
- Lingua principale
- AL
- Stelle
- 714
- Fork
- 482
- Merge medio
- 3g 5h
- PR unite (30g)
- 559
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
-
Team: SCM
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
microsoft/BCApps#13322 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Team: SCM
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
microsoft/BCApps#13250 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Deliv.-Rem. Ext. Text Transfer: OnAfterReadLines will never be reached due to exit(true)ApertaTeam: Finance
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/BCApps#13205 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: FI reference payment matching scans Cust. Ledger Entry because "Reference No." has no keyForse già presa @AndersLarsenMicrosoft l’ha presa 5 giorni fa. ApertaApproved Team: Finance
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
microsoft/BCApps#13101 · 2 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Imported Subscription Line processing misses two fieldsForse già presa @AndersLarsenMicrosoft l’ha presa 5 giorni fa. ApertaApproved Team: Finance
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/BCApps#13004 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/BCApps
Issue simili
-
rivetkit 3.0: HTTP 400 overloaded on node pool upsert is treated as fatal and exits the processAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rivet-dev/rivet#5933 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Lagrunge82/yandex-mail-mcp#36 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
liberation-data/drivine#428 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
code-yeongyu/oh-my-openagent#11731 ·
I maintainer di solito rispondono entro 1 giorno
-
Component - Build
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno