Blank Item

mrQQmrQQ Member Posts: 239
Hello,

for one of our customers, a blank Item (with all fields, including "No." empty) keeps appearing every few months.

I need to catch how it happens. It 99% happens from code, because NotBlank = Yes doesn't help.

Any ideas how to find the place?

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    Check your dataports. It's most likely that there's a custom program somewhere that creates the item numbers automatically.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    mrQQ wrote:
    H...It 99% happens from code, ...

    I think maybe closer to 100%. :wink:

    Anyway be very careful with Blank Items. These can be very dangerous. The Search and Replace mechanism in Navision can not handle blanks. (This is by design). When you delete an Item, or compress ledgers, all its history is moved to a "Blank" item, so if you tried to delete or rename that Item from a form, you will have problems. Also it can cause problems renaming other records that are linked to item, even if no linked to the blank one.
    David Singleton
  • diptish.naskardiptish.naskar Member Posts: 360
    Stressing on the every few months... is there any mothly process that is being run by your client..that might have some connection to the item table... :?:
    Diptish Naskar
    For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
  • GarethGareth Member Posts: 17
    In the OnInsert trigger of the Item table, perform a TESTFIELD("No.");
    This will error for any user input, or any code that does an INSERT(TRUE) into this table.
    Unfortunately it wont pick up any code that just does an INSERT.
    You could also put this code into the OnModify and OnRename triggers as well.
    Hopefully this will highlight what process is causing the problem.
  • ayhan06ayhan06 Member Posts: 210
    we have this problem also.. i wonder if the add-on we use insert this blank item.. may be we (you and us) have used same add-on :)
  • kjboloekjboloe Member Posts: 56
    Hi
    I have found out that the codeunit Inventory Adjustment (5895), creates a blank Item No, if for some reason there is posting.


    InsertDeletedItem(VAR Item : Record Item)
    CLEAR(Item);
    Item.INIT;
    // --> [1]
    Item.Description := 'Codeunit 5895';
    // <-- [1]
    Item."Cost is Adjusted" := FALSE;
    Item."Costing Method" := Item."Costing Method"::FIFO;
    Item.INSERT;

    I don't know if this is the case, but this is the only code which creates a blank Item No.
    Kind regards

    Kenneth Jarlshøi Bolø
    Dynateam A/S
  • garakgarak Member Posts: 3,263
    CU 5895 used an TempTab by this function!

    When you have an Blank Item No, it is definitivly inserted by autom. inserts.
    Check our modif. Code. Or use DevTool to find the parts where an Item is inserted. Mostly an Dataport or XMLPort is the reason.
    Do you make it right, it works too!
Sign In or Register to comment.