Mandatory Fields by "Piggybacking" Codeunit 423

MikeDalziel
Member Posts: 10
Hi,
I'm working my way through CSIDE Solution Development (80437) this week and had the thought has anyone tried amending codeunit 423 "Change Log Management" and Change Log Setup (Field) to include a "Mandatory" boolean?
I've searched the forum and found a few suggestions on modifying codeunit 1 on modify trigger, but none that had this particular approach.
Idea is pretty simple - which is why it's probably flawed... but here goes anyway.
At the VERY least:
Add a Boolean "Mandatory" to Change Log Setup (Field)
Amend Codeunit 423 somewhere near the beginning to check if any fields in the table have been marked as mandatory, if they have and if the field is blank then Error out.
As I say, I'm just starting on the development course but this could interrupt the modify and roll back the transaction. I've been informed that the change log will create a heavy overhead to processing but IN PRINCIPLE are there any thoughts as to why this approach would be a bad plan?
I'm going to try and do it anyway as a practice exercise but I'm just curious to see if anyone else has tried this method with any success before?
I'm working my way through CSIDE Solution Development (80437) this week and had the thought has anyone tried amending codeunit 423 "Change Log Management" and Change Log Setup (Field) to include a "Mandatory" boolean?
I've searched the forum and found a few suggestions on modifying codeunit 1 on modify trigger, but none that had this particular approach.
Idea is pretty simple - which is why it's probably flawed... but here goes anyway.
At the VERY least:
Add a Boolean "Mandatory" to Change Log Setup (Field)
Amend Codeunit 423 somewhere near the beginning to check if any fields in the table have been marked as mandatory, if they have and if the field is blank then Error out.
As I say, I'm just starting on the development course but this could interrupt the modify and roll back the transaction. I've been informed that the change log will create a heavy overhead to processing but IN PRINCIPLE are there any thoughts as to why this approach would be a bad plan?
I'm going to try and do it anyway as a practice exercise but I'm just curious to see if anyone else has tried this method with any success before?
0
Comments
-
Hi,
take a look at this addon. It offers what you want but a little bit more. You can raise an ERROR or a MESSAGE when some of the Mandatory Fields is blank. Also you can check for Mandatory Fields conditionally. We use it and it works great.
Regards, Max
http://www.2-controlware.com/content/en ... or-nav.htm0
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