0

Using a Chronus purchase invoices:

enter image description here

I'm interested in modifying the "Incoming Document Files" textbox.

When I select a file, I want to display it into another factbox, so my first step is trying to read the record that I've selected.

In this case, I've selected the file PLIMON_TSK0007. So if I click on the file PLIMON_TSK0008 it will change and the selected file it will be the PLIMON_TSK0008:

enter image description here

How can I use that event? Or how can I get the record when I select a new row?

I'm trying with this code:

pageextension 51101 "IncomingDoc.Attach.FactBoxExt" extends "Incoming Doc. Attach. FactBox"//193
{
    trigger OnAfterGetRecord()
    begin
    end;

    trigger OnAfterGetCurrRecord()
    begin
    end;
}

But it will break the factbox, when I select a new row it disappears:

enter image description here

That's how it looks when loading that code and selecting TSK0008...

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
kuhi
  • 531
  • 5
  • 23
  • Are you sure there is nothing else in this extension? There must be something missing. A page extension with an empty trigger does not break factboxes usually. – Alexander Drogin Mar 25 '23 at 23:57

1 Answers1

1

You can link one FactBox to another through the Provider property.

Consider page A to which we add page B and page C as FactBoxes. We can then link page C to the selected record on page B like this:

page 50000 A
{
    ...
    
    layout
    {
        area(Content)
        {
            group(Records)
            {
                ...
            }
        }
        area(FactBoxes) {
            part(B;B)
            {
                ...
            }
            part(C;C) {
                Provider = B;
                SubPageLink = ...
            }
        }
    }
}

In your case you would need to add your custom FactBox to the Purchase Invoices page through a pageextension and the set the Provider to the Incoming Document Files FactBox.

kaspermoerch
  • 16,127
  • 4
  • 44
  • 67