Hi Everyone,
I am currently implementing a new feature in Business Central using interfaces, but I have encountered a problem. I would appreciate any insights or assistance regarding this issue. Thank you!
{
procedure ProcessDocument();
}
{
procedure ValidateDocument();
}
{
procedure ProcessDocument()
var
MessageText: Text;
begin
MessageText := 'Processing Sales Invoice...';
Message(MessageText);
end;
begin
Message('Validating Sales Invoice...');
end;
}
{
procedure ProcessDocument()
begin
Message('Processing Sales Order...');
end;
begin
Message('Validating Sales Order...');
end;
}
{
Extensible = true;
{
Caption = 'Sales Invoice';
Implementation = IExtendedDocumentProcessor = SalesInvoiceProcessor;
}
{
Caption = 'Sales Order';
Implementation = IExtendedDocumentProcessor = SalesOrderProcessor;
}
}
{
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
Caption = 'Document Processing';
{
area(Content)
{
group(Group)
{
field(DocumentTypeField; DocumentType)
{
Caption = 'Select Document Type';
}
}
}
}
{
area(Processing)
{
action(ProcessDocument)
{
Caption = 'Process Document';
trigger OnAction()
var
DocumentProcessor: Interface IExtendedDocumentProcessor;
begin
DocumentProcessorFactory(DocumentProcessor);
DocumentProcessor.ProcessDocument(); //I'm getting error at this point, If im commenting this im getting output for ValidateDocument.
DocumentProcessor.ValidateDocument();
end;
}
}
}
begin
iDocumentProcessor := DocumentType;
end;
DocumentType: enum DocumentType;
}
Function ID -1045640884 was called. The object with ID 0 does not have a member with that ID.
ae98ddd9-65ac-44ad-ada7-abe7d3618389
22fb8d08-be5e-4d91-ae28-c7d982cd7e09
7c1505a4-7b10-4b22-86f0-f471580eaf57
2024-10-18T04:10:21.2018751Z
a47a7ce1-1747-442f-841b-cd2ecfcc0893
DocumentProcessingPage(Page 50100)."ProcessDocument - OnAction"(Trigger) line 5 - 17Oct by Default Publisher