How to implement search options on Navision Customer Comments table?

Hi,

We are trying to design a custom form on Navision to display the customer comments entries from the “Comments Line” table.

Can anyone please explain us on how to add search options (search by Date, No.) on a form? Currently, the form displays all the comments entries and we want to view this by date or by customer.

Thanks,

Vinod

I suppose you’re talking about using subforms to show relative information to the actual record, if that’s the way let’s look forms 46 and 42 where and Order is showed with his order lines… maybe you can display in the same way a customer and a subform with his comments.

You will just have to inform a pair of properties, like SourceTable and SourceTableView, with this, comment line will be automatically filtered for the current customer.

On the other hand, what NAV version are you running?, you’re asking about search options but this is default functionality in NAV, you should have icons on your toolbar to Find, Field filter, etc, don’t you?

Hi,

Thanks for your reply. The version we are using is Navision 4.

We exactly require a form like what you have mentioned above. Currently, I have a form with two fields (date and no.) where user can enter either of it. Now I want to display the records that satisfies the criteria. Do we need to write any C/AL codes for displaying records in the subform?

Thanks

C/AL code maybe… but not if you work like form 42. If you want to display comments of clients, you can create a new flap on form 21. I’ll explain step by step:

1- edit form 21 and create a new flap Comments in the TabControl (now you’ll have General, Communication,…,Comments)
2- insert a Subform control in the Comments flap and edit it’s properties:
a. SubformID = Comment List (or 125, that is the number of the form)
b. SubformLink:
tablename CONST Customer
No. FIELD No.
c. save changes and re-open form 21, now you’ll have your flap that automatically will load comments for the current customer

Note that form 125 (Comment List) is not an ideal subform because it’s not adjusted to the left top of Subform control and other things, so you can create a new form called Comments Subform and base on table 97 (Comment Line).

Hope it helps

First you need to have those fields exiting and populated in the comments table.

By the way,

I have implemented this a number of times for cleints. At first glance it looks like a simple mod, but the way multi line comments are handled and sorted in NAV means that its not so simple to sort by date. In the end the best solution is to add a new table that acts as a comments header to handle the “Creation Date” and then use Navision’s exiting comment table as the lines table.

Yes, I thought it was just a simple mod but I don’t really understand why you talk about the dificulty of sorting by date, I’m using it right now and it works properly, could you explain us what you really mean?

Hi,

I am using a Table box control for displaying the comment lines.

Can anyone please tell me how to clear the records in table box before submitting a search criteria (or clearing it while submitting the search criteria, just before displaying the new search results)?

Thanks

Any help on this?