[Extensibility Request][W1][codeunit][6108][E-Document Processing] new events to allow extend "E-Document Type"
Nobody has claimed this yet.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 3d 26m
- Merged PRs (30d)
- 633
Description
Describe the issue
enum "E-Document Type" is extensible, but there is no full support in E-Document to use a new document type.
There are many places to extend. Starting with codeunit "E-Document Processing":
Expected behavior
GetDocSendingProfileForDocRef method:
add a new event
procedure GetDocSendingProfileForDocRef(var RecRef: RecordRef): Record "Document Sending Profile";
var
+ DocumentSendingProfile: Record "Document Sending Profile";
+ IsHandled: Boolean;
begin
case RecRef.Number of
...
+ else
+ IsHandled := false;
+ OnGetDocSendingProfileForDocRef(RecRef, DocumentSendingProfile, IsHandled);
+ if IsHandled then
+ exit(DocumentSendingProfile);
+ end;
end;
+ [IntegrationEvent(false, false)]
+ local procedure OnGetDocSendingProfileForDocRef(var RecRef: RecordRef; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean)
+ begin
+ end;
GetDocSendingProfileForCustVend method
change scope of the method to public
+ procedure GetDocSendingProfileForCustVend(CustomerNo: Code[20]; VendorNo: Code[20]) DocumentSendingProfile: Record "Document Sending Profile";
GetLines method:
add a new event
procedure GetLines(EDocument: Record "E-Document"; var SourceDocumentLines: RecordRef)
+ var
+ IsHandled: Boolean;
begin
case EDocument."Document Type" of
...
+ else
+ IsHandled := false;
+ OnGetLines(EDocument, SourceDocumentLines, IsHandled);
+ end;
end;
+ [IntegrationEvent(false, false)]
+ local procedure OnGetLines(EDocument: Record "E-Document"; var SourceDocumentLines: RecordRef; var IsHandled: Boolean)
+ begin
+ end;
Steps to reproduce
Additional context
No response
I will provide a fix for a bug
- I will provide a fix for a bug
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 by locating codeunit "E-Document Processing" and read GetDocSendingProfileForDocRef, GetDocSendingProfileForCustVend, and GetLines. Confirm how the existing document-type cases work, then implement the requested events and public method scope. Done means extensible document types can provide sending profiles and source lines through these entry points.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100