i try this way but i want when users try to "save" using to close the form or next botton for item that is is mising something a want to show tu user that mesagebo end do not leav to save until all they enter all data
Remember that there is no single moment when NAV saves a record. As soon as you leave a field, it is saved, as supposed to other programs where you manually have to save a record or the whole thing gets saved when leaving a record. there is one exception though : Inserting a record on a form that has the "DelayedInsert" property on.
my problem is that i dont wat user to stop creating items if any necessary data is missing
what you could try in that case is setting the item card to "DelayedInsert" and code your checks in the OnInsertRecord trigger of the form. Problem with this is that 1) you have to do it for EVERY form where you can add an item ( if there are any ), and 2) you are going down a dangerous road....once you do this, your client might want the same for other entities, and you wil end up altering everything in NAV.
This is just not the way NAV works, it's too open for that.
The option I use with Master cards is that I make them blocked on insert record. Then on validate trigger of "Blocked" a function is called to check whether the required fields has been filled.
The option I use with Master cards is that I make them blocked on insert record. Then on validate trigger of "Blocked" a function is called to check whether the required fields has been filled.
I am recommending this way too... There is nothing like "moment when user try to save record". There are moments when user "needs to change value in this or this... field" etc.
Comments
Form - OnQueryCloseForm() : Boolean
i try this way but i want when users try to "save" using to close the form or next botton for item that is is mising something a want to show tu user that mesagebo end do not leav to save until all they enter all data
This is just not the way NAV works, it's too open for that.
http://ssdynamics.co.in
I am recommending this way too... There is nothing like "moment when user try to save record". There are moments when user "needs to change value in this or this... field" etc.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.