I want to stop users from renaming records

mpmaurice
Member Posts: 6
I have a customer table and I want to stop users from renaming the customer record
0
Comments
-
add this code in onrename:
error('you may not rename a customer, yes you may not, you know why, because it's just a code, a primary key so the system knows what customer is connected to which transactions. You want to rename this customer? Try the name field you silly user');0 -
The renaming/changing of primary key values in itself is not a bad thing and should not be deactivated by default. There is a reason why it can be done "out of the box". But often users misunderstand or simply don't know the meaning of such doing and the sometimes catastrophic consequences it can lead to. My advice would be to educate users and explain the consequences.0
-
Or you can customize to have some additional security using User Setup table. Add a boolean field "Auth. Customer Rename" (you can choose your field name) in the table. Give permission to authorized/educated/intellegent users and in Customer Table "OnRename" trigger check the boolean value.CA Sandeep Singla
http://ssdynamics.co.in0 -
We use a setup table Boolean too:
OnRename() SalesSetup.GET; IF SalesSetup."Block Rename of Customer" THEN ERROR('You are not allowed to rename Customers');
We have added similar code to Vendor, Customer, Item tables.
We saw it early in our Nav experience where new users were typing over the field expecting it to move to the record the wanted but forgetting to hit the Magifying Glass (Find). Before you knew it they were renaming. As a double check we made all fields not editable and made a new tab at the end of the form called add/change where edits could be made to customers, vendors, items.0 -
We also had bad experiece at the first few months installation four years back and handled issue using similar idea.
In our case, we simply "DISABLED" the code or No. field and enabled only for INSERT. (With the exception of few super users setup in User Setup table)."A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."0 -
Don't underestimate the power of OnDatabaseRename trigger in Codeunit 1 either. You can control any rename in any table through that trigger, and it's synchronous (unlike OnGlobalRename).(Co-)author of "Implementing Microsoft Dynamics NAV 2009"
http://vjeko.com/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