How to clear records from a table box control?

vinodalathvinodalath Member Posts: 14
Dear All,

Can anyone please explain on how to clear the records in table box before submitting a search criteria?

The problem here is - in my custom form, the table box displays the records as per the search criteria PLUS the last record from the previous search. So I need to clear the table box while submitting the search criteria (just before displaying the new resultset).

Actually, we are trying to make a screen where our Credit Control department users can search for entries added on Comment Line table. The Credit Control department uses the customer comments sheet for adding the follow up details or other comments whenever they make calls to the customer. Now, they require an option to add the next follow up date (Alert Date) and a search functionality on comments table based on the Alert Date field.


Thanks,

Vinod

Answers

  • DaveTDaveT Member Posts: 1,039
    Hi Vinodalath,

    Use currform.update( FALSE ) to refresh the form. The FALSE parameter instructs the form not to save changes so use TRUE to save records
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • vinodalathvinodalath Member Posts: 14
    Can you tell me on which trigger should we use it?
  • DaveTDaveT Member Posts: 1,039
    Hi Vinod,

    After you set the new search filter e.g. if setfilter is set in the onvalidate of a field then call the currform.update in the onaftervalidate trigger or if filter set in a button then update directly afterwards.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
Sign In or Register to comment.