Field No in Item Card

bekio
Member Posts: 204
Hello every one,
I hope that you are enjoyning winter.
I have a questions.
I have created an item with "No."=ABC123 and i don't want that this number to be changed.
If i try at this item to change "No." from ABC123 to XYZ123 it alows me to change, i don't want that this to happend(even if changes all the table data where this item is used).
Any suggestions.
Thanks,
I hope that you are enjoyning winter.
I have a questions.
I have created an item with "No."=ABC123 and i don't want that this number to be changed.
If i try at this item to change "No." from ABC123 to XYZ123 it alows me to change, i don't want that this to happend(even if changes all the table data where this item is used).
Any suggestions.
Thanks,
0
Answers
-
you have to create an Error message on on Modify Trigger of Item Table.Manish Goyal0
-
It does not works, i have tired it.
It works on Rename triger on table!
Thanks0 -
what about editable property of the field in the table?
you don't even need to write code in the onrename trigger...and believe, one day or another maybe you'll need to rename the record from c/al code, and at that time you'll say: "d'oh! i've to remove the error!!"
moreover, it's frustrating for the user to see errors pop up for these things. If you really don't want the user to be allowed to rename the record (why?), just make the field(s) not editable.0 -
Belias wrote:what about editable property of the field in the table?
you don't even need to write code in the onrename trigger...and believe, one day or another maybe you'll need to rename the record from c/al code, and at that time you'll say: "d'oh! i've to remove the error!!"
moreover, it's frustrating for the user to see errors pop up for these things. If you really don't want the user to be allowed to rename the record (why?), just make the field(s) not editable.0 -
What we did is add a field to the setup tables of Item, Customer, Vendor etc.
To disable RENAME but allow it if necessary without keep changing the code..
example
ON the Inventory setup table add a boolean called: "Disable Rename"
On Item Table...
OnRename()
InvtSetup.GET;
IF InvtSetup."Disable Rename" THEN
ERROR('You are not allowed to rename Items');
You can do this for the other main tables too.
Plus it simply lets you uncheck the field to reactivate rename if you need to0 -
Thanks a lot of, i have mentioned that solutions.
It is much more easy to change in the table check or uncheck than to comment and uncomment the code.
Thanks for your solution.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