[Extensibility][W1][MultiObjects] Make E-Document "Send" and "Recreate" public to enable bulk recreate & send
Nobody has claimed this yet.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 3d 26m
- Merged PRs (30d)
- 633
Description
Why do you need this change?
We want to build functionality that lets a user recreate and send several E-Documents in one action — for example, an end-of-day action that re-exports and sends every document that is prepared but not yet transmitted, so that attachments added to the posted documents during the day are included in the outgoing documents.
Business Central today offers automatic send on posting and single-document send from the E-Document card, but there is no public way to recreate or send E-Documents from code, and no standard multi-select/bulk send on the E-Documents list. Exposing the existing recreate and send procedures lets a single extension build this for any integration (Service/PEPPOL and every localization connector) instead of each connector reimplementing it.
It reuses the existing, supported path — Send already dispatches through the public IDocumentSender interface via t exposes no connector internalsand no new data, and changes no behavior. This is a function-visibility change, not an event
request: an event would let an e behavior, whereas here weneed to invoke recreate and send on demand for a chosen set of documents.
Describe the request
Change these two procedures from internal to public so external extensions can call the standard recreate and send:
- Send() in codeunit 6134 "E-Doc. Integration Management" — sends an already-created/exported E-Document (sendable-state check, loads the exported blob, dispatches via IDocumentSender, updates status/logs).
- Recreate() in codeunit 6102 "E-Doc. Export" — re-exports/rebuilds an already-created E-Document (e.g. to embed attachments added to the posted document after the first export). Optionally also ExportEDocument(), which Recreate builds on.
Both are needed together for thbility, hence one request.
Provide an implementation (optional)
- I will provide the implementation for this extensibility request
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with codeunit 6134 "E-Doc. Integration Management" and its Send() procedure, then inspect codeunit 6102 "E-Doc. Export" and Recreate(), including the mentioned ExportEDocument() dependency. Done means external extensions can call the requested procedures for bulk recreate-and-send workflows while the existing send, export, status, and logging behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100