Can i show a form with "CONFIRM"???
Franklin
Member Posts: 253
I make it show a form to accept a CONFIRM?
If I can not do that, you think of a similar option?
:-k :-k :-k
Regards...
If I can not do that, you think of a similar option?
:-k :-k :-k
Regards...
0
Comments
-
What are you trying to do? Do you want to enter data into that form and have a confirm statement show up?
Something like. "Are you sure you want to change X to Y?" Yes/No?
Note: adding an "Are you sure" type of staement really should be added to the Onvalidate of that field in the table. That way if this field is accessed from any other form the confirm is still always asked.0 -
Franklin wrote:I make it show a form to accept a CONFIRM?
If I can not do that, you think of a similar option?
:-k :-k :-k
Regards...
From online help (Help > C/SIDE Reference Guide):CONFIRM (Dialog) Use this function to create a dialog box which prompts the user for a yes or no answer. The system centers the dialog box on the screen for you. Ok := Dialog.CONFIRM(String [, Default] [, Value1] ,...) Ok Data type: boolean This return parameter reflects the user's selection. Ok will be... If you entered... TRUE Yes FALSE No String Data type: code or text constant The system displays this string in the dialog box. Use a back slash (\) to indicate a new line. The string can be a multilanguage enabled text constant. Default Data type: boolean Describes what the computer should use as the default button. If you do not specify a default, the system uses No. Comments The system sizes the message window for you. The height of the window corresponds to the number of lines and the width corresponds to the length of the longest line. Examples In the following example, the Dialog.CONFIRM function prompts the user for a Yes or No answer: Question := Text000; Answer := Dialog.CONFIRM(Question, TRUE); MESSAGE(Text001, Answer); Create the following text constants in the C/AL Globals window: Text Constant ENU Value Text000 'Leave without saving changes?' Text001 'You selected %1.'
-Lavin
"Profanity is the one language all programmers know best."0 -
But before you use CONFIRM, please, do not forget that CONFIRM will pause the transaction if it is already started,thus keeping locks on tables/records etc. Inproper usage of confirm inside transaction can kill server performance. Each time use CONFIRM as soon as possible, before write transaction is started...0
-
Well. What I do is the following. When you register a purchase order, NAV creates the sales order (under conditions). The sales order has a price.
NAV, the price tells you that you are applying (with a message). If you want to continue nothing happens, but otherwise you should show the sales order.
I had never done anything like this, but if you can not make it look otherwise.0 -
Hi
If I understud correctly, you can do that.
.....
If not Confirm('The price is %1. Continue',salesprice) then
begin
clear(OrderForm);
TSalesHeader.get(........);
OrderForm.settableview(TsalesHeader);
OrderForm.runmodal;
end;
....
My question is. What would you like to do with the opened form ????
Bye.0 -
Thx Saalek.
I want to show the Sales Order Form filtered by the new document generated.
I have the same error in the code.
CLEAR(PurchaseOrderForm);
TSalesHeader.SETFILTER("Document Type",'%1',1);
TSalesHeader.SETRANGE("No.",vNumDoc);
SalesOrderForm.SETTABLEVIEW(TSalesHeader);
SalesOrderForm.RUNMODAL;
If i use TSalesHeader.GET it fails too.0 -
What error ??
Try using setrecord.0 -
-
This error (I guess) means that a transaction has started. In that case you cannot do a runmodal because it will lock the resources until a user reaction, which is not allowed.
If your "logical" transaction has finished you must call COMMIT before the runmodal in order to release the resources.
Other wise make sure that you haven't called a Modify or Insert before your call.0 -
Hi
I'm Spanish, so I Understud the message

I'll send you a PM
Bye0 -
Perfect.
The problem was RUNMODAL. I have to use RUN instead of RUNMODAL.
Thx everybody.
=D>0 -
Saalek wrote:Hi
I'm Spanish, so I Understud the message

I'll send you a PM
Bye
I do not need to understand Spanish to know what's going on. If the error message in NAV have more than 4 lines, it is about running write transaction when calling RUNMODAL... :-D0 -
kine wrote:I do not need to understand Spanish to know what's going on. If the error message in NAV have more than 4 lines, it is about running write transaction when calling RUNMODAL... :-D
- SQL Sync. errors, have more than 4 lines, and aren't caused by a RUNMODAL :whistle: :whistle:
0 -
Franklin wrote:Perfect.
The problem was RUNMODAL. I have to use RUN instead of RUNMODAL.
Thx everybody.
=D>
I think that if you use RUN instead of RUNMODAL in your code then your FORM will show up but the code after the RUN will be executed immediately. Depending on what follows (and what precedes) your RUN it might lead to problems (if a modify occurs you might see the famous "Another user has modified ...." ).
Just review it thoroughly.
0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

