I have a small doubt about displaying only a selected record in ProjTable form.
args.record(CustTable::find(‘CUS00009’));
new MenuFunction(MenuItemDisplayStr(CustTable),MenuItemType::Display).run(args);
When a write the above code to display or open the form, CustTable form opens by displaying only CUS00009 details.
But when i do the same thing for ProjTable form, the ProjTable form doesnt open with a particular record selected and hence simply opens the form normally by displaying all the records present in it. I just dont understand why is it happening?
Can anybody please help me on this? I wrote the following code to open ProjTable form by selecting only a particular record
args.record(ProjTable::find(‘PROJ0009’));
new MenuFunction(MenuItemDisplayStr(ProjTableMain),MenuItemType::Display).run(args);
but this code is not opening the form by just selecting that record. ProjTable form is simply opening as usual
But that code would have to be called from a form whose dataSource is ProjTable, and it won´t filter the records it will just positionate you in the record, specifically in the form Tab General
So I think the easiest way to filter it would be to add code in the executeQuery method of the ProjTable datasource, try this:
Declare ProjTable myProjTable;
And call the following code before calling super():