Mibuso Conference
29 10 2008Networking event celebrating (10 years of mibuso.com)
Meet people in real life on 14 May 2009 in Utopolis Mechelen (Belgium)
Categories : Nice to know, Other, Recommended Sites
Networking event celebrating (10 years of mibuso.com)
Meet people in real life on 14 May 2009 in Utopolis Mechelen (Belgium)
The following error messages can be found in Navision Financials, Navision Attain, Navision Solutions, Microsoft Business Solutions Navision, and Dynamics NAV. The error message is generally just a number, this table can be used to find out a little bit more about the error.
See the whole list of error messages:
Did you know that you can copy an error message?
You see:
—————————
Microsoft Dynamics NAV
—————————
Item No. ” does not exist.
—————————
OK
—————————
By exporting or importing data you want to get clean data.
For example:
This line will be imported
This line will be imported
Use this function in your dataport to delete all double spaces in a string:
gFncDeleteDoubleSpaces(lTxtString : Text[1024]) : Text[1024]
IF DELCHR(lTxtString,'=',' ') = '' THEN
EXIT('');
REPEAT
i += 1;
lTxtChar := COPYSTR(lTxtString,i,1);
IF lTxtChar <> ' ' THEN BEGIN
lTxtNewString += lTxtChar;
IF NOT lBlnAddSpace THEN
lBlnAddSpace := TRUE;
END ELSE
IF lBlnAddSpace THEN BEGIN
lTxtNewString += ' ';
lBlnAddSpace := FALSE;
END;
UNTIL i = STRLEN(lTxtString);
EXIT(lTxtNewString);
Define the follow variable:
lTxtNewString as Text(1024)
i as Integer
lTxtChar as Text(1)
lBlnAddSpace asBoolean �
What’s the bug:
- Create a new dataport.
- Select View > Dataport Fields.
- Click on Field Menu button (see 1)
- Select the fields you want to export.
- Here’s the bug (see 2), you cannot press OK / Cancel or Apply.
But how do you get the dataport fields???
After selecting the fields click with your cursor in the Field Designer Form (see 3)
Have you ever started a lengthy NAV batch job, and then wondered how much longer it is really going to take? NAV forms usually have progress bars. Good. But how about something like this:
Each company (I hope) creates every day or week a backup of the database.
Because when the database crashes, there is a backup.
O no, I forgot my SUPER user password!
No problem, restore your backup and after restore do not close the database because you are in the database.
Yes, without username and without a password!
Thanks Bill!
When getting the following error (for example):
(Click on image to enlarge)
This problem arises as result of a not registered dll of the Automation. But which dll?
Follow next steps to found and register the Automation dll:
After the dll registration the problem has gone!
Define the following variabels
Define the following function: GetBestKey()
RecRef.OPEN(27,FALSE,'Company Name'); //Open table 27 - Item
FldRef := RecRef.FIELD(3); //Get field 3 - Description
GetBestKey(); //Get the best key to decrease performance issues
IF BestKeyIndex > 0 THEN
RecRef.CURRENTKEYINDEX(BestKeyIndex); //Set the best key if exists
FldRef.SETFILTER('*@as*'); //Filter on description
IF RecRef.FIND('-') THEN BEGIN
REPEAT
RecReftmp.OPEN(27,TRUE); //\
FldReftmp := RecReftmp.FIELD(3); // \
RecReftmp.INIT; // Empty description
FldRef.VALUE := FldReftmp.VALUE; // /
RecRef.MODIFY; ///
UNTIL RecRef.NEXT = 0;
END;
//Function GetBestKey() code
FOR i := 1 TO RecRef.KEYCOUNT DO BEGIN
KeyRfr := RecRef.KEYINDEX(i);
FOR x := 1 TO KeyRfr.FIELDCOUNT DO BEGIN
KeyFldRef := KeyRfr.FIELDINDEX(x);
IF FldRef.NUMBER = KeyFldRef.NUMBER THEN BEGIN
BestKeyIndex := i;
EXIT;
END;
END;
END;
You can use this code in de OnPostDataItem trigger function.
It’s usefull for Correction Report / Dataports.
Object.SETRANGE(Type,Object.Type::Report);
Object.SETFILTER(ID,DELSTR(CurrReport/CurrDataport.OBJECTID(FALSE),1,7));
IF Object.FIND('-') THEN
Object.DELETE;
Sometimes you want to have a lookup on a dataport or report option tab.
Here my solution to program the lookup:
Define 2 Variabels in the OnLookUp trigger:
- FORM = The form that will be shown. (Type = Form)
- RECORD = The record variable of the FORM that will started. (Type = Record)
CLEAR(FORM); FORM.SETTABLEVIEW(RECORD); FORM.LOOKUPMODE(TRUE); IF FORM.RUNMODAL = ACTION::LookupOK THEN BEGIN FORM.GETRECORD(RECORD); Rec.FIELD := RECORD.FIELD MODIFY; END;
If you’ve got a problem in a time consuming process and the debugger is not usefull enough.
You can use this code to write each value to a text file, wherever you want:
Define gFillTemp as File
gFillTemp.TEXTMODE(TRUE);
gFillTemp.WRITEMODE(TRUE);
IF NOT gFillTemp.OPEN('filename.txt') THEN
gFillTemp.CREATE('C:\filename.txt');
gFillTemp.SEEK(gFillTemp.LEN);
gFillTemp.WRITE('text to write'); //Write text
gFillTemp.WRITE(gRecitem); //Write record
gFillTemp.CLOSE;
Start any program from navision:
For example:
SHELL('access.cpl')
[code] = run Accessibility Controls
Accessibility Wizard - accwiz
Add Hardware Wizard - hdwwiz.cpl
Add/Remove Programs - appwiz.cpl
Administrative Tools - control admintools
Automatic Updates - wuaucpl.cpl
Bluetooth Transfer Wizard - fsquirt
Calculator - calc
Read the rest of this entry »
hotcopy
source=C:\test.fdb
destination=C:\backup
description=”Text”
email=test@test.com
servername=ServerName
username=User password=Password | osauthentication=yes
dbtest=normal
cc=yes
nttype=tcp
Define these Globale:
Define these Text Constants:
gDlgWindow.OPEN(Text001 + Text002 + Text003); gIntNoOfRecords := Rec.COUNT; gIntRowCounter +=1; IF TIME > gTimNextUpdate THEN BEGIN gDlgWindow.UPDATE(1,Rec.Field); gDlgWindow.UPDATE(2,ROUND(gIntRowCounter / gIntNoOfRecords * 10000,1)); gTimNextUpdate := TIME + 200 END; gDlgWindow.CLOSE