Hi all,
I have a list form based on a table (TableA) with PK consisting of three fields. The list form's DelayedInsert property is true. One of the PK fields is hidden and filled by the virtue of RunFormLink property of its caller form (i.e. users get that form via other card form that is based on a table (TableB) that has a table related field {related to TableA}; forgive me for my unsufficient English
). Users fills the second and third PK fields. But there must be a control while entering the third PK field. When the control fails, the user is confirmed whether to keep on. If the user refuses, then he/she himself/herself has to push the Esc key to clear out the third PK field and
then push the F4 key to clear out the second PK field. If he/she doesn't push the Esc key then the confirmation is asked again. If he/she pushes the Esc key but
not the F4 key then the first and second PK field is filled and the record is created with the third PK field
empty.
I don't want to make the user to remember several keystores so I want to cancel out all the job he/she did by using code and returning him/her to his/her (
insufficient English) initial state. I tried clearing the record variable, going to the last record, reseting the record variable and other fantastic things but none of them worked! Should this code be written in the form or table? (I would prefer the table option)
Comments
In this case, the user will not be able to create the record and will be forced to enter correct value or delete the record he/she started to create. This will be easiest way, other ways will be more complicated and non-standard.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Dynamics NAV Developer since 2005
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Dynamics NAV Developer since 2005
you can basically programmatically send a F4 and Yes (to confirm) to NAV if a condition is met, effectively duplicating what happens when the user hits that key to delete a record - of course, i think the new version of NAV changed hotkeys, so you'd have to deal with that during upgrades (is the sendkey you programmed still doing what you want it to do).
it sounds like in your situation, though, training may be the best approach.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.