Monday, December 22, 2014
Sunday, November 23, 2014
Disable "ESC" Button to close form (Without Codes)
I think this is only small tips and tricks if you want to disable "ESC" button to close form without any codes in Navision.
I tried to create simple new form with a source data from Customer Cronus, add few fields (textbox), and add 1 transparent button so that user can't see it. This button has "Cancel" Property = Yes.
When I run the form, user is not able to close the form when press "ESC" button.
Happy trying......
Saturday, November 22, 2014
Happiness
"The happiest people don't have the best of everything. They just make the best of everything. Being happy doesn't mean that everything is perfect. It means that you've decided to look beyond the imperfections."
(Unknown)
Wednesday, November 12, 2014
Navision Virtual Tables
How to know the list of Navision Virtual Table without using SQL Script?
You may use System Object virtual table (ID 2000000029) and show it in form. The form will show the list of Virtual Tables (based on Navision Version) that are not available in Object Designer.
Below picture is using Navision 2009:
Monday, November 10, 2014
Navision Wingdings and Webdings Font List
There is one thing makes me interested in Dashboard form of LS Retail. I found out special font that showing interesting pictures :). It is Wingdings font. It makes me curious to find out more and it may be very useful in my future development.
I create small application to see the list of characters of this font. This listing will make me easier to choose what picture I need in my future development.
Source:
OBJECT Form 50003 Wingdings and Webdings List
{
OBJECT-PROPERTIES
{
Date=11/11/14;
Time=11:05:43 AM;
Modified=Yes;
Version List=MY;
}
PROPERTIES
{
Width=9790;
Height=6710;
Editable=No;
TableBoxID=1000000000;
SourceTable=Table2000000026;
OnOpenForm=BEGIN
SETRANGE(Number,0,255);
END;
OnAfterGetRecord=BEGIN
gChar := Number;
gWingdings := Number;
gWingdings2 := Number;
gWingdings3 := Number;
gWebdings := Number;
END;
}
CONTROLS
{
{ 1000000000;TableBox;220 ;220 ;9350 ;6270 ;HorzGlue=Both;
VertGlue=Both;
RowHeight=1320;
HeadingHeight=990 }
{ 1000000001;TextBox;291 ;770 ;2200 ;440 ;ParentControl=1000000000;
InColumn=Yes;
FontSize=10;
FontBold=Yes;
SourceExpr=Number }
{ 1000000002;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000001;
InColumnHeading=Yes;
FontSize=10;
FontBold=Yes;
CaptionML=ENU=Decimal }
{ 1000000022;TextBox;1693 ;660 ;2200 ;440 ;ParentControl=1000000000;
InColumn=Yes;
FontSize=10;
FontBold=Yes;
CaptionML=ENU=Character;
SourceExpr=gChar }
{ 1000000023;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000022;
InColumnHeading=Yes;
FontSize=10;
FontBold=Yes }
{ 1000000006;TextBox;1693 ;550 ;2200 ;440 ;Name=Wingdings;
ParentControl=1000000000;
InColumn=Yes;
ForeColor=16711680;
BackColor=16777215;
FontName=Wingdings;
FontSize=35;
CaptionML=ENU=Wingdings;
SourceExpr=gWingdings }
{ 1000000007;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000006;
InColumnHeading=Yes;
FontSize=10;
FontBold=Yes }
{ 1000000010;TextBox;6377 ;550 ;2200 ;440 ;ParentControl=1000000000;
InColumn=Yes;
ForeColor=128;
FontName=Wingdings 2;
FontSize=35;
CaptionML=ENU=Wingdings 2;
SourceExpr=gWingdings2 }
{ 1000000011;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000010;
InColumnHeading=Yes;
FontSize=10;
FontBold=Yes }
{ 1000000014;TextBox;9340 ;1540 ;2200 ;440 ;ParentControl=1000000000;
InColumn=Yes;
ForeColor=32896;
FontName=Wingdings 3;
FontSize=35;
CaptionML=ENU=Wingdings 3;
SourceExpr=gWingdings3 }
{ 1000000015;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000014;
InColumnHeading=Yes;
FontSize=10;
FontBold=Yes }
{ 1000000018;TextBox;13679;440 ;2200 ;440 ;ParentControl=1000000000;
InColumn=Yes;
ForeColor=8388736;
FontName=Webdings;
FontSize=35;
CaptionML=ENU=Webdings;
SourceExpr=gWebdings }
{ 1000000019;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000018;
InColumnHeading=Yes;
FontSize=10;
FontBold=Yes }
}
CODE
{
VAR
gWingdings@1000000001 : Char;
gWingdings2@1000000002 : Char;
gWingdings3@1000000005 : Char;
gWebdings@1000000006 : Char;
gChar@1000000008 : Char;
BEGIN
END.
}
}
Wednesday, November 5, 2014
Sample Copy Data from Template Table by using RecordRef
Just trying to create this sample for my reference purpose in future. Refer to CU 8611 (Migration Management) and CU 8612 (Template Management) for more detail....
OnRun()TemplateTable.RESET;IF TemplateTable.FINDSET THEN REPEATFromRecRef.GETTABLE(TemplateTable);ToRecRef.GETTABLE(DestinationTable);ToRecRef.INIT;FieldRec.SETRANGE(TableNo, FromRecRef.NUMBER);FieldRec.SETRANGE(Enabled, TRUE);FieldRec.SETRANGE(Class, FieldRec.Class::Normal);IF FieldRec.FINDSET THEN BEGINInsertRecordWithKeyFields(ToRecRef,FromRecRef);REPEATIF NOT IsKeyField(FieldRec.TableNo,FieldRec."No.") THEN BEGINFromFieldRef := FromRecRef.FIELD(FieldRec."No.");ToFieldRef := ToRecRef.FIELD(FieldRec."No.");ValidateFieldValue(ToRecRef,ToFieldRef,FORMAT(FromFieldRef.VALUE));END;UNTIL FieldRec.NEXT = 0;ToRecRef.MODIFY(TRUE);END;CLEAR(FromFieldRef);CLEAR(ToFieldRef);FromRecRef.CLOSE;ToRecRef.CLOSE;UNTIL TemplateTable.NEXT = 0;MESSAGE('Done !!!');
ValidateFieldValue(VAR RecRef : RecordRef;VAR FieldRef : FieldRef;Value : Text[250])
Field.GET(RecRef.NUMBER,FieldRef.NUMBER);
IF Field.Type <> Field.Type::Option THEN BEGIN
IF Value <> '' THEN
EVALUATE(FieldRef,Value);
END ELSE
IF GetOption(Value,FieldRef.OPTIONCAPTION,OptionAsInteger) THEN
FieldRef.VALUE := OptionAsInteger;
FieldRef.VALIDATE;
GetOption(Value : Text[250];OptionString : Text[1024];VAR OptionInteger : Integer) Valid : Boolean
IF Value = '' THEN
EXIT;
IF EVALUATE(OptionInteger,Value) THEN BEGIN
EXIT(TRUE);
END;
ValueInOptionString := FALSE;
CommaPos := STRPOS(OptionString,',');
WHILE NOT ValueInOptionString AND (CommaPos > 0) DO BEGIN
IF STRPOS(OptionString,',') <> 0 THEN
Option := COPYSTR(OptionString,1,STRPOS(OptionString,',')-1)
ELSE
Option := OptionString;
IF Option = Value THEN
ValueInOptionString := TRUE
ELSE
OptionPos := OptionPos + 1;
OptionString := DELSTR(OptionString,1,CommaPos);
CommaPos := STRPOS(OptionString,',');
END;
IF OptionString = Value THEN
ValueInOptionString := TRUE;
OptionInteger := OptionPos;
EXIT(ValueInOptionString);
InsertRecordWithKeyFields(VAR RecRef : RecordRef;_RecRef : RecordRef)
_KeyRef := _RecRef.KEYINDEX(1);
KeyRef := RecRef.KEYINDEX(1);
FOR KeyFieldCount := 1 TO KeyRef.FIELDCOUNT DO BEGIN
_FieldRef := _KeyRef.FIELDINDEX(KeyFieldCount);
FieldRef := KeyRef.FIELDINDEX(KeyFieldCount);
ValidateFieldValue(RecRef,FieldRef,FORMAT(_FieldRef.VALUE));
END;
RecRef1 := RecRef.DUPLICATE;
IF RecRef1.FIND('=') THEN BEGIN
RecRef := RecRef1;
EXIT
END;
RecRef.INSERT(TRUE);
IsKeyField(TableID : Integer;FieldID : Integer) : Boolean
RecRef.OPEN(TableID);
KeyRef := RecRef.KEYINDEX(1);
FOR KeyFieldCount := 1 TO KeyRef.FIELDCOUNT DO BEGIN
FieldRef := KeyRef.FIELDINDEX(KeyFieldCount);
IF FieldRef.NUMBER = FieldID THEN
EXIT(TRUE);
END;
EXIT(FALSE);
Tuesday, October 28, 2014
Action Apply DO
Bruce Lee :
Knowing is not enough, we must apply. Willing is not enough, we must do.
Knowing is not enough, we must apply. Willing is not enough, we must do.
Subscribe to:
Posts (Atom)