[Event Change] codeunit 13657 FIKSubscribers
Following EventSubscriber is hardcoded to use the "Sales - Invoice" - so if you create your own layout in a extension or traditional way though develop envoirment you would not be able to get FIK-String on your layout.
Required setup Company information - credit no. - have data. Sales Invoice - use FIK-71 in payment method. Issue: Try take a copy of report 206 to your own ID range and run the report. See difference in orginal vs in new id range. In your own ID range FIK-string wont show.
Line 250 in codeunit 13657 FIKSubscribers.
//report 206
[EventSubscriber(ObjectType::Report, Report::"Sales - Invoice", 'OnGetDocumentReferenceText', '', false, false)]
procedure SetReferenceTextOnGetReferenceText(SalesInvoiceHeader: Record "Sales Invoice Header"; VAR DocumentReference: Text; VAR DocumentReferenceText: Text; VAR Handled: Boolean);
VAR
FIKMgt: Codeunit FIKManagement;
begin
IF Handled THEN
EXIT;
DocumentReferenceText := '';
DocumentReference := FIKMgt.GetFIK71String(SalesInvoiceHeader."No.");
IF DocumentReference <> '' THEN
DocumentReferenceText := DocumentReferenceCaptionTxt;
Handled := TRUE;
end;
This is the current design. If you copy application objects that publish events you also need to copy all subscribers to keep the functionality.
Its the current design? I can see that. I have copied the application objects that publish events and all the subscribers - but if you hardcode report name into the event subscriber then it can only work from that subscriber. Please re-open and take another look at this - this is not ideal made.