Finding all Custom Try Functions

nick_robbonick_robbo Member Posts: 49
Hi All,

This is a long shot, but I thought I would ask.

Currently we have this property DisableWriteInsideTryFunctions set to False on our NST's.
This is because in the past we have incorrectly implemented Try Functions which modify/insert data into the DB.
I would now like to refactor these functions to use IF Codeunit.RUN instead.

To do this, I would ideally like to get a list of all the Try Functions in our Objects.
I am just wondering if there is a way to do this, I have checked PRISM and there doesn't seem to be an option to find just Try Functions.
The only other option I can think of is to write a Powershell Script to analyze the objects and return the procedure names with the object ID.

Has anyone done this previously, or does anyone have a suggestion?

Thanks.

Best Answer

Answers

  • nick_robbonick_robbo Member Posts: 49
    The simplest method would be to dump all (or modified) objects into one large text file, and search for [Try Function] inside. Fairly easy and quick thing to do imho.

    If you use Notepad++ you can use Mark Line functionality and mark all lines having [Try Function] string, and all lines starting from PROCEDURE, you can the copy all bookmarked lines an you will have complete list of your try functions.

    Perfect, not sure why that didn't occur to me. Thanks very much.
Sign In or Register to comment.