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
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-036
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
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-036 -
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
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions