Hello,
How can I disable GUI messages during import?
I am working on Nav 2009 R2 and created an xml port to import sales invoices and during import, I get a message it says You may have changed a dimension. Do you want to update the lines? I do not wish to see this message.
I traced the code and saw that salesperson onvalidate calls update dimensions function from table 357 Document Dimension. It checks for GUIALLOWED or not. I know GUIALLOWED is not property but is there anyway I can set it false? The code below didn't work for me
Ok := GUIALLOWED;
Ok := FALSE;
so I changed the source code in table 357 document dimension, added sethidevalidationdialog but still no luck,
IF UpdateLine <> UpdateLine::Update THEN
//IF GUIALLOWED THEN (orj code)
IF NOT HideValidationDialog AND GUIALLOWED THEN
IF ShippedReceived THEN BEGIN
IF NOT CONFIRM(Text006,TRUE) THEN
EXIT
END ELSE
IF NOT CONFIRM(Text003,TRUE) THEN //this line cause a problem
EXIT;
Text003 You may have changed a dimension.\\Do you want to update the lines?
Answers
RIS Plus, LLC
Maybe I should do something after END ELSE statement?
Thank you for your answer Daniel!
It works like the code above my but I want to set to validation dialog from the import.
I called from the import but it passes as "False" even though I coded like that:
Any clues on how to set hidevalidation true from the import?
Thank you so much
The way you've got that code, you are setting HideValidation only for the first record.
RIS Plus, LLC
ELSE
IF HideValidationDialog THEN
EXIT
I also added repeat and UNTIL DocDimensionRec.NEXT = 0; to get all records, but still, it takes HideValidationDialog as false instead of true.
Thank you so much Daniel for you help!
Is there any chance you have a Local AND a Global Variable named "HideValidationDialog"
So that you would set the local one in your SetHideValidateionDialog-Function and use the global one in the main Code (which would be false either way).
Weird one, but that would explain the behaviour you encounter.
RIS Plus, LLC
I know I have done that once before
I checked but there is only one HideValidationDialog and that's a global variable.
Thank you
You are right Daniel, I am not very clear here.
I am running NAV 2009R2 and using XMLport from RTC 2009R2 so I can't use the debugger but I created a form and put my code there and it returns HideValidationDialog to yes.
I will look at it more.
Thank you so much for your help and time.