TableFilter on Permission Table

How can datatype / field this be set from c/side code? I get a type conversion error if I try to use text.

Hello, This is an option string field and these need to be coded as follows in C/SIDE: If the Permission table is a local or global variable called “PermissionRec” then: PermissionRec.SETRANGE(PermissionRec.“Object Type”,“Object Type”::“Table Data”); Or if it is the main table you are working with (Say in a form or report based on the table): SETRANGE(“Object Type”,“Object Type”::“Table Data”); Hope this is of some help!

Thank you but sorry, I wasn’t very clear, I meant setting the ‘Security Filter’ field in the table which, I think, is the only instance of data type ‘TableFilter’. Have now been advised that EVALUATE can be applied to this data type.

Be also advised that the TableFilter data type is not really useful for anything but Navision’s own permission system. From the online help:


TABLEFILTER Use this data type to apply a filter to another table. At the moment, this data type can only be used when you are setting security filters from the Permission table.

I tried to use it the first time I saw it, but gave up after an hour or so because I had no success and ended up finding this text. [xx(] However, if someone has a way of using it, by all means please post it!