Hello
my problem is when i try to create a mandatory field in a form on the OnNewRecord Button like
IF Name = '' THEN BEGIN
MESSAGE('Bitte das Feld Name ausfüllen');
CurrForm.Name.ACTIVATE();
END;
and i push the new Record Button he shows me the Message but he creates the new Record and jump to the new record... in my opinion he should keep the current data record and jump to the empty field.
how can i realise it?
an another try was that i set in the table on the onmodify and oninsert button the Testfield(name)
but then he test the name field of the new created record... and that is normaly empty.

you understand my problem?
Comments
Loads of infos about this.
Basic solution though is not to do it; It is not supported by Navision. You should educate your users instead of porgramming not-navision like code.
but i do something wrong... and i have tried so much...
has somebody a step by step tutorial maybe? :shock:
i need a field that must get an value befor the user can close it / before he can create a new record.
http://www.mibuso.com/forum/viewtopic.p ... =mandatory
And if yes, what part is not clear to you?
Regards
Daniel Zimmermann
IF ("No." <> xRec."No.") AND (xRec."No." <> '') THEN BEGIN
IF xRec.Name = '' THEN BEGIN
Rec := xRec;
xRec.TRANSFERFIELDS(Rec);
CurrForm.UPDATE(FALSE);
MESSAGE('Your Message');
END;
END;
on the Form 5050 (contact Card)
i try it on the oninsert/onmodify/onclose trigger...
I get no effekt.. navision creates a new record when i push the button new record set. and shows no message when i close the window.