[W1][Codeunit][6402][E-Doc. Purch. Doc. Helper] Event before inserting the purchase line created from a draft line
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- fintech-quant
- Área
- api
Línea de trabajo
El trabajo está en el codeunit 6402 "E-Doc. Purch. Doc. Helper" de la app AL, dentro de CreatePurchaseLineFromDraft, justo antes de PurchaseLine.Insert(). Lee ese procedimiento y los eventos públicos existentes en la app E-Document para igualar la nomenclatura y el patrón de publicador. Se considera terminado cuando se publica un nuevo evento de integración allí, en un objeto público, con la firma del issue, y una prueba o un suscriptor de ejemplo demuestra que la Purchase Line puede modificarse antes de insertarse.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Why do you need this change?
Since 29.0, table 6101 "E-Document Purchase Line" is public, so extensions can add their own fields to draft lines, for example a coding field a clerk fills on the Purchase Document Draft before finalizing.
When the user (or the Payables Agent) runs Finalize draft, CreatePurchaseLineFromDraft in codeunit 6402 "E-Doc. Purch. Doc. Helper" copies only a fixed set of draft fields to the new Purchase Line. Nothing public tells an extension which Purchase Line was created from which draft line:
CreatePurchaseLineFromDraftraises no event, and codeunit 6402 isAccess = Internal.- Table 6141 "E-Doc. Record Link" is
Access = Internal. GetLinkedPurchaseLine/GetFromLinkedPurchaseLineon table 6101 are internal.- The only public hook,
OnAfterProcessIncomingEDocument, fires after the whole document is created, without line context.
Additional Fields does not cover this: it validates values from its own internal store, not an extension's draft-line field.
Extensions are therefore left matching draft lines to invoice lines by position after the fact, which depends on the internal loop order (in 28.1 lines were grouped by receipt; in 29.0 they follow the draft key order).
A second, related need: after the default dimensions and the draft's dimension set are combined, the draft's "[BC] Shortcut Dimension 1 Code" / "[BC] Shortcut Dimension 2 Code" are validated onto the line. A blank draft value therefore removes a default dimension that came from the G/L account. An extension cannot restore it without knowing the source draft line.
Related: #7531 (extending Import Process 2.0).
Describe the request
In codeunit 6402 "E-Doc. Purch. Doc. Helper", procedure CreatePurchaseLineFromDraft, immediately before PurchaseLine.Insert(), raise an integration event that other apps can subscribe to. Because codeunit 6402 is internal, the event needs to be published on a public object (or the publisher made accessible), for example:
[IntegrationEvent(false, false)]
local procedure OnBeforeInsertPurchaseLineFromDraft(EDocumentPurchaseLine: Record "E-Document Purchase Line"; var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header")
begin
end;
This lets a subscriber copy its own draft-line fields to the Purchase Line and adjust its dimensions before the line is saved, with no extra Modify and no dependency on the internal line order.
Provide an implementation (optional)
- I will provide the implementation for this extensibility request
- Lenguaje dominante
- AL
- Estrellas
- 714
- Forks
- 482
- Merge medio
- 3 d 9 h
- PR fusionados (30 d)
- 557
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/BCApps
-
Team: Integrations
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/BCApps#13401 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Extensibillity Request] - page 497 "Reservation Entries"Posiblemente ocupada @business-central-extensibility-bot la tomó hace 2 días. AbiertoApproved ext-ready-to-implement extensibility-enhancement Team: SCM
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
microsoft/BCApps#13352 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Team: SCM
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
microsoft/BCApps#13322 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Team: SCM
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
microsoft/BCApps#13250 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Deliv.-Rem. Ext. Text Transfer: OnAfterReadLines will never be reached due to exit(true)AbiertoTeam: Finance
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/BCApps#13205 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/BCApps
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
storytold/craft-libs#471 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NEARBuilders/everything-dev#678 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
formbricks/formbricks#9881 ·
Los mantenedores suelen responder en 1 día
-
_threads/application: Update typing annotations using `pyupgrade --py311-plus`Posiblemente ocupada @gudnimg la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día