Individual Table Relations between Anveo Pages
For most cases, Anveo Client Suite uses default relations defined in Anveo Page Table-Field Relation (Read more here).
In some cases, a more complex relation is required having multiple tables being involved, or dynamic filters are required like being based on current date. This can be achieved by using an Action Code in Anveo Script.
In the following example code, Anveo Script filters table customer ledger entry to related Customer No., to Open = TRUE and also to Due Date <= TODAY. Finally, the desired Anveo Page ASLS_CL_ENTRIES will be opened using Anveo Script. This Action Code can be integrated on a customer list or -card page because it is based on Rec to be a customer.
[[Declare your required variables]]
local CLE = Record('Cust. Ledger Entry');
[[Define your filters here]]
CLE:SETRANGE('Customer No.', Rec:GETVALUE('No.'));
CLE:SETFILTER('Due Date', '..%1', TODAY());
[[Open Anveo Page]]
PAGE_OPEN('ASLS_CL_ENTRIES', CLE, Rec);
You only have to use Action Codes if you need complex filters with multiple tables or dynamic data filters. If you simply have relations from table-field to another, please use the set-up of Anveo Page Table-Field Relation. This set-up does not need any source code. Read more here.