Hi. Which event can I use to detect when the user has changed from one record (for example a contact record) to another. I need to make some validations then.
In fact. I only want to warn the user that certain fields must be filled (in case they are not filled). And I must do it only with some records (not all).
I'm using the OnNextRecord trigger but I have some problems because when I show a warning the form shows the next record instead of the record the warning refers to. It'a a little mesh.
The code is like:
OK := TRUE;
IF Type = Type::Person THEN
OK := ValidaDatosContacto; //This function returns False if some
compulsory fields are missing and shows
a warning
I think that you can do it in OnModify of the table, check the values, and if there is problem, call Error with some info... (or you can add it into OnInsert too, but you must test it)
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
May be that your answer will clear the situation and the solution will be easy... :-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I'm using the OnNextRecord trigger but I have some problems because when I show a warning the form shows the next record instead of the record the warning refers to. It'a a little mesh.
The code is like:
OK := TRUE;
IF Type = Type::Person THEN
OK := ValidaDatosContacto; //This function returns False if some
compulsory fields are missing and shows
a warning
IF OK THEN
EXIT(NEXT(Steps));
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
http://www.mibuso.com/forum/viewtopic.php?t=1438
http://www.BiloBeauty.com
http://www.autismspeaks.org