Confirm: How dont I show the focus in YES or NO ?

euges
Member Posts: 8
Hello.
I have a CONFIRM function but I need dont have the focus in YES or NO.
Or this, I need that the users push with mouse in the button YES or NO for validate. They cant use the key ENTER for validate the option.
How can I do ?
Thx a lot !.
I have a CONFIRM function but I need dont have the focus in YES or NO.
Or this, I need that the users push with mouse in the button YES or NO for validate. They cant use the key ENTER for validate the option.
How can I do ?
Thx a lot !.
0
Best Answers
-
C/AL does not support this.
You may try to create a Page or use Dotnet to show a dialog.5 -
In 2009 it is not a big problem. Just create new form to imitate confirmation dialog.Nav Upgrades and DEV outsourcing
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com5 -
Perhaps following example will show you where to look
Pay attention to properties PushAction and Focusable on Confirm form.OBJECT Form 58887 TestForm { OBJECT-PROPERTIES { Date=04/08/16; Time=[ 3:43:08 PM]; Modified=Yes; Version List=; } PROPERTIES { Width=3740; Height=2860; } CONTROLS { { 6000000;CommandButton;660;1540;2200 ;550 ;CaptionML=ENU=Confirm; OnPush=VAR ConfirmForm@6000000 : Form 58888; CheckReturnedOption@6000002 : 'Equal,Less,Greater'; CheckReturnedDecimal@6000003 : Decimal; BEGIN ConfirmForm.SetConfirmText('Do you confirm variable value ' + FORMAT(SomeVar) + '?'); ConfirmForm.LOOKUPMODE := TRUE; IF ConfirmForm.RUNMODAL = ACTION::LookupOK THEN BEGIN ConfirmForm.GetValues(CheckReturnedOption,CheckReturnedDecimal); MESSAGE('Confirmed :)\Returned values %1 and %2',CheckReturnedOption,CheckReturnedDecimal); END ELSE MESSAGE('Not confirmed :('); END; } { 6000001;TextBox ;550 ;440 ;2420 ;440 ;SourceExpr=SomeVar } } CODE { VAR SomeVar@6000000 : Decimal; BEGIN END. } } OBJECT Form 58888 Confirm Form { OBJECT-PROPERTIES { Date=04/08/16; Time=[ 3:40:08 PM]; Modified=Yes; Version List=; } PROPERTIES { Width=8140; Height=4070; CaptionML=ENU=Confirm; BorderStyle=Double; Minimizable=No; Maximizable=No; Sizeable=No; } CONTROLS { { 6000000;CommandButton;550;2970;1650 ;880 ;Focusable=No; PushAction=LookupOK; CaptionML=ENU=Yes } { 6000001;CommandButton;2420;2970;1650;880 ;Focusable=No; Cancel=Yes; PushAction=LookupCancel; CaptionML=ENU=No } { 6000002;TextBox ;110 ;220 ;4510 ;2420 ;Editable=No; HorzAlign=Center; VertAlign=Center; MultiLine=Yes; SourceExpr=ConfirmText } { 6000003;OptionButton;5830;990 ;1100 ;440 ;CaptionML=ENU=< 0; SourceExpr=ReturnValue1; OptionValue=lt } { 6000004;OptionButton;5830;1540;1100 ;440 ;CaptionML=ENU="= 0"; SourceExpr=ReturnValue1; OptionValue=eq } { 6000005;OptionButton;5830;2090;1100 ;440 ;CaptionML=ENU=> 0; SourceExpr=ReturnValue1; OptionValue=gt } { 6000006;Label ;4840 ;330 ;3080 ;440 ;HorzAlign=Center; LeaderDots=No; CaptionML=ENU=Some Option to return } { 6000007;TextBox ;5500 ;3410 ;1700 ;440 ;SourceExpr=ReturnValue2 } { 6000008;Label ;4730 ;2750 ;3300 ;440 ;ParentControl=6000007; HorzAlign=Center; LeaderDots=No; CaptionML=ENU=Some Decimal to return } } CODE { VAR ConfirmText@6000000 : Text[1024]; ReturnValue1@6000001 : 'eq,lt,gt'; ReturnValue2@6000002 : Decimal; PROCEDURE SetConfirmText@6000000(NewText@6000000 : Text[1024]); BEGIN ConfirmText := NewText; END; PROCEDURE GetValues@6000003(VAR ReturnedOption@6000000 : 'eq,lt,gt';VAR ReturnedDecimal@6000001 : Decimal); BEGIN ReturnedOption := ReturnValue1; ReturnedDecimal := ReturnValue2; END; BEGIN END. } }
It is hard to swim against self bloodstream... (c) Old, experienced kamikadze.1
Answers
-
C/AL does not support this.
You may try to create a Page or use Dotnet to show a dialog.5 -
Hum, I have Nav2009. I cant create pages.0
-
Hey Euges,
I saw many people asking this question "How to restrict users using Enter Key". So First of all let me tell you Yes it's Possible and therefore finally I decided to find a way and introduce here in my Blog. Please check if this too helps you.
https://rockwithnav.wordpress.com/2016/03/25/disable-specific-keyboard-keys-single-line-of-code/
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
In 2009 it is not a big problem. Just create new form to imitate confirmation dialog.Nav Upgrades and DEV outsourcing
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com5 -
Tnx a lot !.0
-
You can use standard Form 343 as example.Nav Upgrades and DEV outsourcing
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com1 -
Perhaps following example will show you where to look
Pay attention to properties PushAction and Focusable on Confirm form.OBJECT Form 58887 TestForm { OBJECT-PROPERTIES { Date=04/08/16; Time=[ 3:43:08 PM]; Modified=Yes; Version List=; } PROPERTIES { Width=3740; Height=2860; } CONTROLS { { 6000000;CommandButton;660;1540;2200 ;550 ;CaptionML=ENU=Confirm; OnPush=VAR ConfirmForm@6000000 : Form 58888; CheckReturnedOption@6000002 : 'Equal,Less,Greater'; CheckReturnedDecimal@6000003 : Decimal; BEGIN ConfirmForm.SetConfirmText('Do you confirm variable value ' + FORMAT(SomeVar) + '?'); ConfirmForm.LOOKUPMODE := TRUE; IF ConfirmForm.RUNMODAL = ACTION::LookupOK THEN BEGIN ConfirmForm.GetValues(CheckReturnedOption,CheckReturnedDecimal); MESSAGE('Confirmed :)\Returned values %1 and %2',CheckReturnedOption,CheckReturnedDecimal); END ELSE MESSAGE('Not confirmed :('); END; } { 6000001;TextBox ;550 ;440 ;2420 ;440 ;SourceExpr=SomeVar } } CODE { VAR SomeVar@6000000 : Decimal; BEGIN END. } } OBJECT Form 58888 Confirm Form { OBJECT-PROPERTIES { Date=04/08/16; Time=[ 3:40:08 PM]; Modified=Yes; Version List=; } PROPERTIES { Width=8140; Height=4070; CaptionML=ENU=Confirm; BorderStyle=Double; Minimizable=No; Maximizable=No; Sizeable=No; } CONTROLS { { 6000000;CommandButton;550;2970;1650 ;880 ;Focusable=No; PushAction=LookupOK; CaptionML=ENU=Yes } { 6000001;CommandButton;2420;2970;1650;880 ;Focusable=No; Cancel=Yes; PushAction=LookupCancel; CaptionML=ENU=No } { 6000002;TextBox ;110 ;220 ;4510 ;2420 ;Editable=No; HorzAlign=Center; VertAlign=Center; MultiLine=Yes; SourceExpr=ConfirmText } { 6000003;OptionButton;5830;990 ;1100 ;440 ;CaptionML=ENU=< 0; SourceExpr=ReturnValue1; OptionValue=lt } { 6000004;OptionButton;5830;1540;1100 ;440 ;CaptionML=ENU="= 0"; SourceExpr=ReturnValue1; OptionValue=eq } { 6000005;OptionButton;5830;2090;1100 ;440 ;CaptionML=ENU=> 0; SourceExpr=ReturnValue1; OptionValue=gt } { 6000006;Label ;4840 ;330 ;3080 ;440 ;HorzAlign=Center; LeaderDots=No; CaptionML=ENU=Some Option to return } { 6000007;TextBox ;5500 ;3410 ;1700 ;440 ;SourceExpr=ReturnValue2 } { 6000008;Label ;4730 ;2750 ;3300 ;440 ;ParentControl=6000007; HorzAlign=Center; LeaderDots=No; CaptionML=ENU=Some Decimal to return } } CODE { VAR ConfirmText@6000000 : Text[1024]; ReturnValue1@6000001 : 'eq,lt,gt'; ReturnValue2@6000002 : Decimal; PROCEDURE SetConfirmText@6000000(NewText@6000000 : Text[1024]); BEGIN ConfirmText := NewText; END; PROCEDURE GetValues@6000003(VAR ReturnedOption@6000000 : 'eq,lt,gt';VAR ReturnedDecimal@6000001 : Decimal); BEGIN ReturnedOption := ReturnValue1; ReturnedDecimal := ReturnValue2; END; BEGIN END. } }
It is hard to swim against self bloodstream... (c) Old, experienced kamikadze.1 -
Perhaps following example will show you where to look
Pay attention to properties PushAction and Focusable on Confirm form.OBJECT Form 58887 TestForm { OBJECT-PROPERTIES { Date=04/08/16; Time=[ 3:43:08 PM]; Modified=Yes; Version List=; } PROPERTIES { Width=3740; Height=2860; } CONTROLS { { 6000000;CommandButton;660;1540;2200 ;550 ;CaptionML=ENU=Confirm; OnPush=VAR ConfirmForm@6000000 : Form 58888; CheckReturnedOption@6000002 : 'Equal,Less,Greater'; CheckReturnedDecimal@6000003 : Decimal; BEGIN ConfirmForm.SetConfirmText('Do you confirm variable value ' + FORMAT(SomeVar) + '?'); ConfirmForm.LOOKUPMODE := TRUE; IF ConfirmForm.RUNMODAL = ACTION::LookupOK THEN BEGIN ConfirmForm.GetValues(CheckReturnedOption,CheckReturnedDecimal); MESSAGE('Confirmed :)\Returned values %1 and %2',CheckReturnedOption,CheckReturnedDecimal); END ELSE MESSAGE('Not confirmed :('); END; } { 6000001;TextBox ;550 ;440 ;2420 ;440 ;SourceExpr=SomeVar } } CODE { VAR SomeVar@6000000 : Decimal; BEGIN END. } } OBJECT Form 58888 Confirm Form { OBJECT-PROPERTIES { Date=04/08/16; Time=[ 3:40:08 PM]; Modified=Yes; Version List=; } PROPERTIES { Width=8140; Height=4070; CaptionML=ENU=Confirm; BorderStyle=Double; Minimizable=No; Maximizable=No; Sizeable=No; } CONTROLS { { 6000000;CommandButton;550;2970;1650 ;880 ;Focusable=No; PushAction=LookupOK; CaptionML=ENU=Yes } { 6000001;CommandButton;2420;2970;1650;880 ;Focusable=No; Cancel=Yes; PushAction=LookupCancel; CaptionML=ENU=No } { 6000002;TextBox ;110 ;220 ;4510 ;2420 ;Editable=No; HorzAlign=Center; VertAlign=Center; MultiLine=Yes; SourceExpr=ConfirmText } { 6000003;OptionButton;5830;990 ;1100 ;440 ;CaptionML=ENU=< 0; SourceExpr=ReturnValue1; OptionValue=lt } { 6000004;OptionButton;5830;1540;1100 ;440 ;CaptionML=ENU="= 0"; SourceExpr=ReturnValue1; OptionValue=eq } { 6000005;OptionButton;5830;2090;1100 ;440 ;CaptionML=ENU=> 0; SourceExpr=ReturnValue1; OptionValue=gt } { 6000006;Label ;4840 ;330 ;3080 ;440 ;HorzAlign=Center; LeaderDots=No; CaptionML=ENU=Some Option to return } { 6000007;TextBox ;5500 ;3410 ;1700 ;440 ;SourceExpr=ReturnValue2 } { 6000008;Label ;4730 ;2750 ;3300 ;440 ;ParentControl=6000007; HorzAlign=Center; LeaderDots=No; CaptionML=ENU=Some Decimal to return } } CODE { VAR ConfirmText@6000000 : Text[1024]; ReturnValue1@6000001 : 'eq,lt,gt'; ReturnValue2@6000002 : Decimal; PROCEDURE SetConfirmText@6000000(NewText@6000000 : Text[1024]); BEGIN ConfirmText := NewText; END; PROCEDURE GetValues@6000003(VAR ReturnedOption@6000000 : 'eq,lt,gt';VAR ReturnedDecimal@6000001 : Decimal); BEGIN ReturnedOption := ReturnValue1; ReturnedDecimal := ReturnValue2; END; BEGIN END. } }
It is simply perfect.
Thanks !!!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions