Adding a Command button to a Form


I want to add a button to the Item Card which adds a location code filter.

So when the button is pushed, the user will only see the inventory in warehouse location code 1

Can someone help with beginner instructions ?


If you really wnat - but I recommend that you teach the users how to use the Filters in Navision so that they can apply the logice in all situations.

Create Command Botton on the Card.

In the OnPush Trigger.

SETFILTER(“Location Filter” , ‘1’);

Seems to work for me.

It is applying a filter to the Field Location Filter which is a FlowFilter Field that changes the calculation of the Inventory.

Son’t for get the Glue properties for the Commnabd button.

Maybe you should make a “toggle” switch for this:

IF GETFILTER("Location Filter") = '1' THEN
SETRANGE("Location Filter")
SETFILTER("Location Filter", '1');


That was exactly how I tested it was working!