Finding all Custom Try Functions
nick_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.
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.
0
Best Answer
-
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.Slawek Guzek - www.yitron.co.uk
Business Central, MS SQL Server, Wherescape RED;6
Answers
-
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.Slawek Guzek - www.yitron.co.uk
Business Central, MS SQL Server, Wherescape RED;6 -
Slawek_Guzek wrote: »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.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
