hi all
i have sales invoice for example Shipment date is 08/17/10
and today is 09/22/10
after I add another item in this Invoice it would be message like this
Shipment Date 08/17/10 is before Workdate 09/22/10
how do I disabled it?
because i made report to import data
there're a lot of data, and it's very annoying to click OK for these messages after i import it
does anybody know how to disabled it while i import?
thanks
0
Answers
Just debug the code and find the area.
Remember where you have to set validation in the Sales Line Table at the of importing the data.
What are your efforts in this?
What have you tried to do?
TECHNICAL SIDE:
The Importing Processes mimic the manual process of creating Sales Invoice.
Since you know the repro step, i.e. the condition that the message will occur, I think you could utililize the Debugger to see where it comes from.
Once you get it, you can remark the code MESSAGE(Shipment Date %1 is before Workdate %2).
Usually, it is in the field OnValidate on the table.
FUNCTIONAL SIDE:
From the message it clearly stated that the Shipment Date of the line will be created (get from the Header) is BEFORE than the WORKDATE, hence simply change your workdate to the very earliest possible date, e.g. 01/01/10.
I believe the message now will be skipped.
Andwian
yes because i think it's because i validate the item no.
but can i dissabled this message box without touching the sales line table?
Andwian
i think i should do in the technical side....
It is very simple and do not need any programming.
Andwian
and i dont want to change that....
we, the technical side maybe can change what they want without changing workdate they want to use
Good luck!
Andwian
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thank you, Kamil!
Andwian
SetHideValidationDialog ?
where should i put it?
in table 37 which is that is the table i want to insert in
where can i find SetHideValidationDialog ?
i want to disabled this one
1) Add own condition and function to set the flag
2) Add function to set variable HasBeenShown which is already used in condition for this statement
3) Backup the curren workdate, set the workdate back to some date, validate the field, and restore the workdate.
You didn't wrote the NAV version you are on. There are differences between the versions in this standard functionality...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Or you do not need to change the table, only your report and do something like:
as already suggested few times...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
still failed
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
using form..... but after it validates item no, it will automatically validate shipment date
but if i block that code in shipment date... that's what i want
hope you understand
sales line has also another function, called
SetHideValidationDialog(NewHideValidationDialog : Boolean) we can call this function passing TRUE before performing any validation logic, in order to skip every message. Very comfortable, you can replicate the same logic.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
so we add this code in my report?
without edit code in table 37?
i just know in nav 3.7 doesn't have this function
and i copy it from 2009
2. condition the message to the hidevalidationdialog parameter
3. call the function in your report before validating the fields.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
already done that
but still appear the message box
there may be another message somewhere else, or you missed something in coding...you know it HAVE TO work!
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
become
it works...
but not validated
but you WANT TO VALIDATE this field, isn't it?
The solution is so simple that i can't explain it more than this: use debugger, find the additional message and condition it to hidevalidationdialog variable...ok?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Ok belias... thanks a lot for your advice
(HideValidationDialog OR HasBeenShown)
in Shipment Date On validate (Table 37)
i change the code from
IF NOT HasBeenShown THEN BEGIN
become
IF NOT (HideValidationDialog OR HasBeenShown) AND GUIALLOWED THEN BEGIN
thanks all
EDIT: well, it seems you "make it work"...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
now i understand
thanks :thumbsup: