Running Table Filter(Ctrl + F7) in RTC ,with code

navinbnavinb Member Posts: 51
edited 2012-10-02 in NAV Three Tier
Hi all,

I created a field with table filter data type ,in C/SIDE i added a assist edit button for lookup to the table filter form based on the table ID specified in Tableexpr property.The tableexpr is also a field value (TableID) in the same table which will include Table ID on which i actually i want to run the table filter form.Now in RTC to run the Table Filter based on the values in the Table ID field ,i have to run the Tablefilter form by writing code in OnAssistedit trigger of form.But actually my problem is that i dont know the form id of the table filter form .
Sendkeys will not work as the table on which i want to run the table filter form will depend on the value in field TableID .I can find only one such case in base database ie. security filter in permission form ..

Thanks in advance !!

Comments

  • Marc_Hansen_[MSFT]Marc_Hansen_[MSFT] Member, Microsoft Employee Posts: 12
    Look in V7.

    And do the same as Page 9803 Permission, Security Filter - OnAssistEdit()

    Name DataType Subtype Length
    TableFilter Record Table Filter
    TableFilterPage Page Table Filter

    Security Filter - OnAssistEdit()
    TableFilter.FILTERGROUP(2);
    TableFilter.SETRANGE("Table Number","Object ID");
    TableFilter.FILTERGROUP(0);
    TableFilterPage.SETTABLEVIEW(TableFilter);
    TableFilterPage.SetSourceTable(FORMAT("Security Filter"),"Object ID","Object Name");
    IF ACTION::OK = TableFilterPage.RUNMODAL THEN
    EVALUATE("Security Filter",TableFilterPage.CreateTextTableFilter(FALSE));

    Hope this helps.
    This posting is provided "AS IS" with no warranties, and confers no rights.
Sign In or Register to comment.