Hello,
I have a problem with the OnValidate Trigger in a table.
When I select a new Data Entry for exampe "No." in a table I execute some code in the OnValidate Trigger of the field
and insert some "option lines" in an related table.
(OnVALIDATE)...
IF XtAttributeLines_loc.FIND('-') THEN BEGIN
REPEAT
XtAttributeLines2_loc.INIT;
XtAttributeLines2_loc.TRANSFERFIELDS(XtAttributeLines_loc);
XtAttributeLines2_loc.Type := Type;
XtAttributeLines2_loc."No." := "No.";
XtAttributeLines2_loc."Item No." := "Item No.";
IF NOT XtAttributeLines2_loc.INSERT THEN
XtAttributeLines2_loc.MODIFY;
UNTIL XtAttributeLines_loc.NEXT = 0;
END;
Now I have a problem when the "No" Entry is terminated. From system the message "Do you want to overwrite data y/n"
is displayed. When I select "No" my "Validate Code" is always executed and I have some Option Data Lines in the table which
I only want to inser on the "Yes" option of the System Message.
Is it possible to "catch" the system Message "Overwrite Data y/n" and skip the validation code if I select No?
It is a little bit difficult to explain but I hope someone can figure it out.
Thx
Siggi
Comments
Pargesoft
you transfer the fields then under the line you are setting the type, item no, etc again?
http://www.BiloBeauty.com
http://www.autismspeaks.org
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
the simpliest solution is always the last on the mind
Of course this way is much more useable.