Write necessary code which will not allow inserting item until "Inventory posting group" and "gen.pr

Mounika22Mounika22 Member Posts: 18
how can we implement this

Answers

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Please let us also know what did you try till now and what is not working
  • XhevatXhevat Member Posts: 9
    No you cannot implement this functionality in Navision. All you can do is to check item when you buy or when you sale this Item. If an item has no filled necessary fields, you can stop entering this item as line one purchase or sales or any document.
  • RockWithNAVRockWithNAV Member Posts: 1,139

    Hey Mounika22,

    There could be two approach.

    1. What Xhevat said you can follow as you need to stop execution or transaction while sales or Purchase.
    2. Second approach will be write validation while creating new item so that system will stop completion of your Item Creation while creating Item. For this you need to write code on PageOnQueryClose.
  • kylehardinkylehardin Member Posts: 257
    You could put some code in the OnInsert and OnModify triggers that would set Blocked to TRUE if either of those two fields are blank.
    Kyle Hardin - ArcherPoint
  • SavatageSavatage Member Posts: 7,142
    Is this a main table like Vendor, item, customer. Then you could set the blocked to true oninsert.
    The onvalidate on the blocked field you could put
    testfield('myfmandatoryfield1')
    testfield('myfmandatoryfield2')
    etc.

    if one of them is blank then it wouldn't let you unblock the record. Then the only way to use the record is to make sure all the fields are filled.

    Also Set the property "Not Blank"
Sign In or Register to comment.