Block Blank Item Effectively

slmaluwaslmaluwa Member Posts: 364
Hi all

In one implementation, I see that an item with BLANK code is created and now it cannot be deleted because it is linked may transaction/documents. When I further study, the lines are all ZERO valued. That means, they are created automatically when a user creates (go beyond last line) a new blank item in orders etc and doesn't fill it up.

Is there a way to stop this behaviour in future without deleting the existing BLANK item?

Any ideas?
"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."

Comments

  • ameenameen Member Posts: 217
    You cannot enter a blank No. field in Microsoft Dynamics NAV. However, you can import an item that has a blank No. field in the primary key
    ameen
  • DaveTDaveT Member Posts: 1,039
    Hi,

    Ameen is correct - this is most likely from an import. The reason you cannot delete this record manually, is that the ONDELETE trigger is checking the item ledger entry (for example) filtered on the code. A filter on blank returns all records so error. To correct this you could write code to get the record and delete it with DELETE(FALSE) which will bypass the ondelete trigger. You will then have to delete any infromation imported into sub-tables eg Item Unit of Measure.

    As always be careful when deleting and test off-line.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • DeepDeep Member Posts: 569
    Ideally you MUST not have any blank record in the item table.
    You may be unable to delete it as there may be some blank purchase lines/sale lines/Item journal Line etc. are existing in the database.
    You must delete these blank lines to delete the Blank Item.

    Kindly note that your Adjust Item Cost entries will not function correctly and will endup in an infinite loop if any blank record exists in the item table.
    Regards,

    Deep
    India
Sign In or Register to comment.