So a friend and I talked about how to search for data in NAV across all tables, and I said, I can do that in 10 lines of code.
Last year, we took the first steps towards proper on-line help for our add-on. Before, we had always had documentation in the form of Microsoft Word and PDF files on a network share, but the new system, based on the NAV Help Server, was intended to provide an easy-to-find, uniform, multi-language-enabled, extensible, searchable source of information for both our consultants and end-customers.
This coffee break post illustrates how to search a text file for specific words or a phrase. You can do this with Windows PowerShell in any text files, but let’s use some Dynamics NAV objects exported as text. Technically speaking we are reading a text file then piping it line for line through a search cmdlet, which pipes matching lines further to a log.txt file.