ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Page 193 'Incoming Doc. Attach. FactBox' - LoadDataFromRecord procedure OnAfterLoadDataFromRecord event

Open polina-se opened this issue 1 year ago • 1 comments

Why do you need this change?

Dear Microsoft Team, On behalf of Allvue, I want to request a change in the existing event OnAfterLoadDataFromRecord of page 193, 'Incoming Doc. Attach. FactBox'. We need to set custom filters for the Rec variable in the LoadDataFromRecord procedure of page 193, 'Incoming Doc. Attach. FactBox'.

Describe the request

I would like to request the addition of the Rec parameter to the OnAfterLoadDataFromRecord event. This variable will allow setting custom filters to the Rec variable of page 193, 'Incoming Doc. Attach. FactBox'. Please implement these changes in the BC25 version.

Event Code:

[IntegrationEvent(true, false)]
local procedure OnAfterLoadDataFromRecord(var MainRecordRef: RecordRef; var Rec: Record "Inc. Doc. Attachment Overview")  // new parameter
begin
end;

Procedure Code:

procedure LoadDataFromRecord(MainRecordVariant: Variant)
var
    IncomingDocument: Record "Incoming Document";
    DataTypeManagement: Codeunit "Data Type Management";
begin
    LoadedDataFromRecord := true;

    if not DataTypeManagement.GetRecordRef(MainRecordVariant, MainRecordRef) then
        exit;

    OnLoadDataFromRecordOnBeforeDeleteAll(Rec);
    Rec.DeleteAll();

    if not MainRecordRef.Get(MainRecordRef.RecordId) then
        exit;

    if GetIncomingDocumentRecord(MainRecordVariant, IncomingDocument) then
        Rec.InsertFromIncomingDocument(IncomingDocument, Rec);

    OnAfterLoadDataFromRecord(MainRecordRef, Rec); // new parameter
    CurrPage.Update(false);
end;

Internal work item: AB#592339

polina-se avatar Jul 15 '25 15:07 polina-se

Thank you for your request.

After reviewing the proposed event we have decided not to implement this modification. We do not consider this a suitable general integration point for the application.

If the current implementation does not meet your specific requirements, we recommend implementing your own version of the FactBox to accommodate your custom logic.

stkillen avatar Jul 25 '25 12:07 stkillen