cannot rename blank customer record

triciaallisontriciaallison 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

Comments

  • facadefacade Member Posts: 57
    You must remove any if relations from Gen. Journal Line and from somewhere else, cannot remeber from where - goes for Vendors also.
  • eromeineromein Member Posts: 589
    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."
  • WiechardtWiechardt Member Posts: 25
    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.
  • triciaallisontriciaallison Member Posts: 20
    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
  • tularamtularam Member Posts: 97
    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 ....
  • rhpntrhpnt Member Posts: 688
    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).
    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?
  • rhpntrhpnt Member Posts: 688
    Ohhh....

    Didn't notice how old this post is! Sorry.
Sign In or Register to comment.