Buttons in the Ribbon are created through Page Actions
- Open Development Environment
- Find Page>Design
- View>Page Actions
- Select Action
- View>Properties
- Find the RunPageLink field
- Select the value, click on the three dots to open the field selection
- Each field on the left is a filter that can be added to the page that will open. Select Type FIELD. Each field on the right is a field from the original page that will be used as the filter value
This method does not work on Custom Reports.
To get a Custom Report to open with a filter
To get a Custom Report to open with a filter
- Clear the RunObject property on the PageAction Button
- This leaves you with Just a button that does nothing
- Use CAL code on the Page Action to set the report filters and launch the report.
- Read current Record into a Variable
- Set the Range on the Record to the current record
- Run the report passing in the Range options set on the Giftrec
- In this example, GiftRec is a local Record
<Action1200000013> - OnAction()
GiftRec := Rec;
//MESSAGE(GiftRec."No.");
GiftRec.SETRANGE("No.",GiftRec."No.");
REPORT.RUNMODAL(50010,TRUE,TRUE,GiftRec);
action("Adv. Item Bin Contents")
{
CaptionML = ENU = 'Adv. Item Bin Contents';
ApplicationArea = All;
Image = ShowMatrix;
RunObject = Page "Adv. Item Bin Contents";
RunPageLink = "Item No." = Field("No.");
Promoted = true;
PromotedCategory = Process;
}
No comments:
Post a Comment