You cannot delete or change the type of the Location field (

imurphyimurphy Member Posts: 308
I have an odd problem which I don't understand. I have added a field called 'location' to the 'Job journal line', 'Job Task' and 'Job Planning line' tables. Its a plain text field, nothing special.

I have just tried to restore a backup of the company and get the following error:
You cannot delete or change the type of the Location field (in the Job Journal Line table) before the value in the field is reduced to 0 (zero) or '' (blank) in all records. This message occurred because a nonzero value was found for the record Journal Template Name='PROJ',Journal Batch Name='GENERIC',Line No.='30000' in company XXX Ltd.
This makes no sense. The 'location' field has to contain nothing to restore it?

Anyone understand this message?

Comments

  • BeliasBelias Member Posts: 2,998
    seems that you're restoring an old backup.
    in that backup there weren't location field, so nav is trying to delete the location field from your current database. and this is not possible if there is data in it. You should check if you're restoring the correct backup because you may lose some of your personalizations.
    you can export your actual objects, clear location field and then restore if the chosen backup is correct...but be careful!
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • imurphyimurphy Member Posts: 308
    This is just a copy of the clients Db. I took the copy yesterday.

    However, you have given me a clue. I have multiple copied of a couple of the clients companies - renamed - in this db. I may just wipe them all and restore from scratch.

    I'll let you know if it works.

    Ian
  • DaveTDaveT Member Posts: 1,039
    Hi Ian,

    You will probably find that one of the companies you restored had a modified Job Journal Line table and there is associated data in the company data. When you try to deleted the field it checks all companies (using the field no.) and gives this error.

    Been that soldier :mrgreen:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • imurphyimurphy Member Posts: 308
    yep, thats it. I just tried out restoring the complete DB and it worked without problems. That what you get for keeping copies of copies of copies... should do the housekeeping more often.

    Thanks

    Ian
Sign In or Register to comment.