SETRECFILTER Function (Record)

Sets the values in the current key of the current record as a record filter.


Record.SETRECFILTER

You can use this function to set a filter on a table before running a report. Enter C/AL code similar to the following example in the OnPush Trigger of a command button or menu item on a form. When the code is triggered, the current key fields of the current record in the form will be used as a filter when the report is run.

This example requires that you create the following variable in the C/AL Globals window.

Variable name DataType Subtype

CustomerRec

Record

Customer

CustomerRec.SETRECFILTER;
REPORT.RUN(REPORT::"111",FALSE,FALSE,CustomerRec); 

Community Additions

ADD
Show: