cannot rename blank customer record
                
                    triciaallison                
                
                    Member Posts: 20                
            
                        
            
                    Hi.  My customer has accidently created a customer record with a blank in the No. field.  I don't know if it was created this way, or renamed to this.  However, this is causing numerous problems throughout the system.  When they try to rename the record, they get the error, "You cannot rename a record because the old value of the field below is '',
Field: No.
Table: Customer
I've tried changing it through Object Designer - same error. Does anyone have any suggesions for how to rename this record? We cannot delete it because it has many transactions against it.
Many Thanks!
Tricia
                Field: No.
Table: Customer
I've tried changing it through Object Designer - same error. Does anyone have any suggesions for how to rename this record? We cannot delete it because it has many transactions against it.
Many Thanks!
Tricia
0                
            Comments
- 
            You must remove any if relations from Gen. Journal Line and from somewhere else, cannot remeber from where - goes for Vendors also.0
 - 
            You should disable the code in the OnRename trigger and try again. Not the most fancy way to do it, but it works. Just be sure the customer doesn't have any ledger entries or other realted records.
Don't forget to enable the code again!"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 - 
            The problem with a customer record where the No. field is blank is that the system considers all Journal Lines where the Type = Customer, and no Account Number has been filled in yeat to be linked to this customer.
The most probably reason why there is a customer with a blank number is that is was created during data migration (importing of customer records).
I agree, your best solution will be to disable the code in the OnRename, rename the customer and then re-enable the code, or, if there are no transactions posted to this customer, delete the customer. You may have to delete All journal lines that are unposted where the Account Type = Customer and the Account No. = blank first before you can delete the customer.0 - 
            Thanks for all of the suggestions. However, it still won't let me rename the record. If anyone else has any suggestions, or has ever encountered this before, please let me know!
Thanks for everyone's help!
Tricia0 - 
            triciaallison wrote:Thanks for all of the suggestions. However, it still won't let me rename the record. If anyone else has any suggestions, or has ever encountered this before, please let me know!
Thanks for everyone's help!
Tricia
This is just because you are going to modify part of primary key
just remove it from your table if you added it and try ....0 - 
            triciaallison wrote:My customer has accidently created a customer record with a blank in the No. field.
As far as I know it's impossible to create a customer with a blank number (at least the standard NAV way).triciaallison wrote:We cannot delete it because it has many transactions against it.
How do you know that there are transactions present? When there are some then it sure wasn't created by accident.
Is the DB on MS SQL?0 - 
            Ohhh....
Didn't notice how old this post is! Sorry.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
 - 323 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