Situation:
In Sales Order Card form, I press F3, and a custom prompt came out.
Then decided that I want to cancel the new record.
The card still shows the new record.
Situation:
In Sales Order Card form, I press F3, and a custom prompt came out.
Then decided that I want to cancel the new record.
The card still shows the new record.
Any suggestions? Thanks! :P
Why? What you want to solve by asking user if he really wants to create the record?
CASE STRMENU(SeriesList,0,'Please choose a series:') OF
0 : BEGIN
ERROR('Please push ESC to cancel');
EXIT;
END;
1 : "No." := NoSeriesMgmt.GetNextNo(SalesSetup."Order Nos.",0D,TRUE);
2 : "No." := NoSeriesMgmt.GetNextNo(SeriesCode[1],0D,TRUE);
3 : "No." := NoSeriesMgmt.GetNextNo(SeriesCode[2],0D,TRUE);
END;
This is on Sales Order Form. in case the user push cancel, the form by default shows the next number, where as it should not. This is caused by one of the no. series being set default in the first place in the no. series list.
the above code just prevent the user from going further.
in simple terms, user hit F3, then decides not to add new record.
Why not just set the no. series to not be default? Than the user select the no. series through assist edit as standard way how to do that...
Then, how can I make the AssistEdit appear automatically after user push F3? (user dont have to push AssistEdit button)
I haven't got a clue how to do that.
Answers
My Blog - nav.education
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Why? What you want to solve by asking user if he really wants to create the record?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
This is on Sales Order Form. in case the user push cancel, the form by default shows the next number, where as it should not. This is caused by one of the no. series being set default in the first place in the no. series list.
the above code just prevent the user from going further.
in simple terms, user hit F3, then decides not to add new record.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Then, how can I make the AssistEdit appear automatically after user push F3? (user dont have to push AssistEdit button)
I haven't got a clue how to do that.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Got this around by using Automation.
OnNewRecord()
Worked like a charm! \:D/
edit: this solution not related to the first issue.
This is a horrible solution. :thumbsdown: