Microsoft Dynamics NAV

Team Blog

  • Microsoft Dynamics NAV Team Blog

    Error - Cannot create more than one clustered index on table

    • 0 Comments

    This post describes one scenario in which this error occurs. There may be others.

    In the late 4.0 versions of the NAV executables, all tables in NAV had a clustered index created on SQL for the primary key (Index 0).
    However, the table objects in 4.0 versions did not have the Clustered property set on any of the keys.
    It was also possible on 4.0 to toggle that property (on/off) and NAV would allow you to leave the table with none of the keys flagged as clustered, but the primary index on SQL remained clustered.

    In the 5.0 versions, this behavior has changed. It is no longer possible to modify a table object to turn off the Clustered property on all keys. If you do this, save and compile the table, and then go back into designer and view keys, you will see that the 5.0 (and SP1) client has automatically turned on the Clustered property on the primary key. It is not possible in 5.0 to create a table with no clustered index.

     So, consider a scenario where you have a 4.0 database that has been converted to 5.0 SP1 executables. This is usually done one of two ways...

    1) Open the 4.0 database with the 5.0 SP1 executable and click Ok to convert
    2) Create a new database with the 5.0 SP1 executable and restore the 4.0 database backup using the NAV Client.

    With 5.0 SP1, using either of these two methods, the Clustered property on the 4.0 object's primary key is automatically flagged.

    If for any reason a 4.0 table object is later imported into the converted database, you end up with a situation where the clustered index remains on SQL, but the table object no longer has the Clustered property flagged. This doesn't cause any immediate problem, but let's say you later want to do a full object upgrade to 5.0 SP1 objects. In step 8 of the Upgrade Quickguide, you are instructed to import the new customized objects created in the compare and merge process. Some of the 5.0 SP1 table objects, for example Sales Header, have had the clustered index changed to a secondary key. When these tables are imported into the database, NAV will not drop the primary clustered index but will try to create the secondary clustered index, triggering the above error.

    The workaround for this issue is to go into the table object in design mode and flag the primary key as clustered, then try importing the 5.0 SP1 table object again. Because the Clustered property is set, NAV will drop and recreate the primary key (index on SQL) before creating the secondary clustered index.


    Laura K. Lake (lalake)

    Microsoft Dynamics NA


    Microsoft Customer Service and Support (CSS) North America

  • Microsoft Dynamics NAV Team Blog

    RIM Tool on 5.0 SP1

    • 0 Comments

    Although the RIM tool was originally designed to assist in the setup of Master data; i.e. Customers, Vendors, Items, etc., the reality is that many are using the Data Migration tool to bring in journal lines to set up beginning balances and to bring over historical data from legacy applications.

    With the release of 5.0 SP1, a new data type conversion routine was introduced with codeunit 5302 - Outlook Synch. Type Conversion. There are several known issues with data conversion due to these changes.

    All of these issue have been reported to development and are being considered for a fix in a future release of the NAV product.

    This post offers some code suggestions and workarounds for the more common and/or critical issues. Many of the suggested workarounds involve one particular codeunit in the Data Migration tool, 8611 – Migration Management, so the following combined change log should be helpful.


    This change log applies to 5.0 SP1 application objects ONLY.

    Issues addressed by the change log:

    1) Overflow on type conversion from Text to Text in Form 8626 when a text field larger than 100 chars is imported.
    2) Error on import of fields beginning with a number (i.e. 1099 Code) - The call to member selectSingleNode failed. msxml6.dll returned the following message: Expression must evaluate to a node-set.
    3) Imported dates are blank after migration data is applied.
    4) Decimal values are converted incorrectly. Ex. - 7,500 becomes 7.5 after the migration data is applied.
    5) Negative decimal values are converted incorrectly, resulting in changed values.
    6) Error - Expected token 'EOF' found '$'. Error on fields with $ symbol
    7) Error - The expression Text cannot be type-converted to a Boolean value (or Date value). This may occur on Setup Questionnaire, Data Migration or Data Template.


    Changes are labeled with the associated number above.


    *****Start Code fix*****

     

    Form 8626 Migration Records

    ---------------------------

    Before:

    CODE

      {

        VAR

          MatrixColumnCaptions@1000 : ARRAY [100] OF Text[100];

          MigrationData@1001 : Record 8615;

          MatrixCellData@1002 : ARRAY [100] OF Text[100];

          MigrationColumnField@1004 : ARRAY [100] OF Integer;

          MatrixColumnOrdinal@1003 : Integer;

          FormCaption@1005 : Text[1024];

          TableNo@1006 : Integer;

          Text001@1007 : TextConst 'ENU=%1 value ''%2'' does not exist.';

    After:

    CODE

      {

        VAR

          MatrixColumnCaptions@1000 : ARRAY [100] OF Text[100];

          MigrationData@1001 : Record 8615;

          MatrixCellData@1002 : ARRAY [100] OF Text[250];  // #1 Change Text[100] to Text[250]

          MigrationColumnField@1004 : ARRAY [100] OF Integer;

          MatrixColumnOrdinal@1003 : Integer;

          FormCaption@1005 : Text[1024];

          TableNo@1006 : Integer;

          Text001@1007 : TextConst 'ENU=%1 value ''%2'' does not exist.';

     

    * XMLport 8610 - Setup DataSchema

    ---------------------------------

    ...

    NameIn := DELCHR(NameIn,'=','Ù''`');

    NameIn := DELCHR(CONVERTSTR(NameIn,'<>,./\+-&()%','            '),'=',' ');

    NameIn := DELCHR(NameIn,'=',' ');

    EXIT(NameIn);

    ...

     

    After:

    ...

    NameIn := DELCHR(NameIn,'=','Ù''`');

    NameIn := DELCHR(CONVERTSTR(NameIn,'<>,./\+-&()%$','             '),'=',' ');  // #6 Change line- add $ symbol

    NameIn := DELCHR(NameIn,'=',' ');

    IF (NameIn[1] >= '0') AND (NameIn[1] <= '9') THEN    // #2 Add line

      NameIn := '_' + NameIn;         // #2 Add line

    EXIT(NameIn);

     

    * Codeunit 8611\Function FieldNodeExists ...

    --------------------------------------------

    Before:

    FieldNode := RecordNode.selectSingleNode(FieldNodeName);

    IF NOT ISCLEAR(FieldNode) THEN

      EXIT(TRUE);

    After:

    IF (FieldNodeName[1] >= '0') AND (FieldNodeName[1] <= '9') THEN         //  #2 Add line

      FieldNodeName := '_' + FieldNodeName;                                                   //  #2 Add line

    FieldNode := RecordNode.selectSingleNode(FieldNodeName);

    IF NOT ISCLEAR(FieldNode) THEN

      EXIT(TRUE);

     

    * Codeunit 8611, Function GetElementName

    ----------------------------------------

    Before:

    ...

    NameIn := DELCHR(NameIn,'=','Ù''`');

    NameIn := DELCHR(CONVERTSTR(NameIn,'<>,./\+-&()%','            '),'=',' ');

    NameIn := DELCHR(NameIn,'=',' ');

    EXIT(NameIn);

    ...

     

    After:

    ...

    NameIn := DELCHR(NameIn,'=','Ù''`');

    NameIn := DELCHR(CONVERTSTR(NameIn,'<>,./\+-&()%$','             '),'=',' ');  // #6 Change line - add $ symbol

    NameIn := DELCHR(NameIn,'=',' ');

    IF (NameIn[1] >= '0') AND (NameIn[1] <= '9') THEN    // #2 Add line

      NameIn := '_' + NameIn;     // #2 Add line

    EXIT(NameIn);

    * Codeunit 8611, Function ValidateFieldValue

    --------------------------------------------

    Before:

     

    Field.GET(RecRef.NUMBER,FieldRef.NUMBER);

    IF Field.Type <> Field.Type::Option THEN BEGIN

      IF Value <> '' THEN

        //IF CompanySetupRun THEN                                           // #7 Delete

          EVALUATE(FieldRef,Value)

        //ELSE                                                                               // #7 Delete

        //  FieldRef.VALIDATE(Value);                                         // #7 Delete

    END ELSE

      IF GetOption(Value,FieldRef.OPTIONCAPTION,OptionAsInteger) THEN

        IF CompanySetupRun THEN

          FieldRef.VALUE := OptionAsInteger

        ELSE

          FieldRef.VALIDATE(OptionAsInteger);

    IF NOT CompanySetupRun THEN

      IF NOT TestRelation(FieldRef) THEN

        FieldRef.VALIDATE;

    After:

     

    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

        IF CompanySetupRun THEN

          FieldRef.VALUE := OptionAsInteger

        ELSE

          FieldRef.VALIDATE(OptionAsInteger);

    IF NOT CompanySetupRun THEN

      IF NOT TestRelation(FieldRef) THEN

        FieldRef.VALIDATE;

    * Codeunit 8611, Function ModifyRecordWithOtherFields

    -----------------------------------------------------

    Before:

    VAR

          MatrixData@1002 : Record 8615;

          MigrationTableField@1000 : Record 8616;

          Question@1003 : Record 8612;

          Field@1007 : Record 2000000041;

          MigrationTable@1009 : Record 8613;

          DataTemplateHeader@1011 : Record 8618;

          QuestionnaireMgt@1006 : Codeunit 8610;

          TemplateMgt@1012 : Codeunit 8612;

          OSynchTypeConversion@1014 : Codeunit 5302;

          FieldRef@1001 : FieldRef;

          OptionInt@1008 : Integer;

          DateFormula@1010 : DateFormula;

          ToValidate@1013 : Boolean;

    After:

     VAR

          MatrixData@1002 : Record 8615;

          MigrationTableField@1000 : Record 8616;

          Question@1003 : Record 8612;

          Field@1007 : Record 2000000041;

          MigrationTable@1009 : Record 8613;

          DataTemplateHeader@1011 : Record 8618;

          QuestionnaireMgt@1006 : Codeunit 8610;

          TemplateMgt@1012 : Codeunit 8612;

          OSynchTypeConversion@1014 : Codeunit 5302;

          FieldRef@1001 : FieldRef;

          OptionInt@1008 : Integer;

          DateFormula@1010 : DateFormula;

          ToValidate@1013 : Boolean;

          DateValue@1500000 : Date;                   // #3 Add

    Before:

     

        IF MigrationTableField.FIND('-') THEN

          IF NOT IsKeyField(MigrationTableField.TableID,MigrationTableField.FieldID) THEN BEGIN

            FieldRef := RecRef.FIELD(MatrixData.FieldID);

            IF CompanySetupRun THEN

              ToValidate:= FALSE

            ELSE

              ToValidate := MigrationTableField.Validate AND NOT TestRelation(FieldRef);

            OSynchTypeConversion.EvaluateTextToFieldRef(MatrixData.Value,FieldRef,ToValidate)

          END;

          IF DataTemplateHeader.GET(MigrationTable."Data Template") THEN

            TemplateMgt.UpdateRecord(DataTemplateHeader,RecRef);

    After:

        IF MigrationTableField.FIND('-') THEN

          IF NOT IsKeyField(MigrationTableField.TableID,MigrationTableField.FieldID) THEN BEGIN

            FieldRef := RecRef.FIELD(MatrixData.FieldID);

            IF CompanySetupRun THEN

              ToValidate:= FALSE

            ELSE

              ToValidate := MigrationTableField.Validate AND NOT TestRelation(FieldRef);

            //OSynchTypeConversion.EvaluateTextToFieldRef(MatrixData.Value,FieldRef,ToValidate)          // #3 Delete

            Field.GET(RecRef.NUMBER, FieldRef.NUMBER);       // #3 Add line

            IF Field.Type <> Field.Type::Date THEN                 // #3 Add line

              OSynchTypeConversion.EvaluateTextToFieldRef(MatrixData.Value,FieldRef,ToValidate)      // #3 Add line

            ELSE BEGIN                     // #3 Add line

              EVALUATE(DateValue, MatrixData.Value);          // #3 Add line

              FieldRef.VALUE := DateValue;      // #3 Add line

            END;         // #3 Add line

          END;

          IF DataTemplateHeader.GET(MigrationTable."Data Template") THEN

            TemplateMgt.UpdateRecord(DataTemplateHeader,RecRef);

     

    * Codeunit 8611, Function ImportSetupDataXML

    --------------------------------------------

    Before:

     

                IF MigrationData.Value <> '' THEN BEGIN

                  ConvertXMLDates(FieldRef,MigrationData.Value);

                  FieldError(MigrationData,EvaluateValue(FieldRef,MigrationData.Value));

                  IF FORMAT(FieldRef.VALUE) <> '' THEN

                    IF FORMAT(FieldRef.TYPE) <> 'Option' THEN

                      MigrationData.Value := FORMAT(FieldRef.VALUE)

                    ELSE

                      MigrationData.Value := GetOptionString(FieldRef,FORMAT(FieldRef.VALUE));

    After:

                IF MigrationData.Value <> '' THEN BEGIN

                  ConvertXMLDates(FieldRef,MigrationData.Value);

                  FieldError(MigrationData,EvaluateValue(FieldRef,MigrationData.Value));

                  IF FORMAT(FieldRef.VALUE) <> '' THEN

                    IF FORMAT(FieldRef.TYPE) <> 'Option' THEN BEGIN                                    // #4 Add BEGIN

                      IF FORMAT(FieldRef.TYPE) <> 'Decimal' THEN                                       // #4 Add line

                        MigrationData.Value := FORMAT(FieldRef.VALUE);

                    END ELSE                                                                           // #4 Add END

                      MigrationData.Value := GetOptionString(FieldRef,FORMAT(FieldRef.VALUE));           

     

    * Codeunit 8611, Function ConvertXMLDates

    -----------------------------------------

    Before:

     

         CASE Field.Type OF

        

           Field.Type::Date:

             BEGIN

               IF EVALUATE(Date, Value,XMLFormat) THEN BEGIN

                 Value := FORMAT(Date);

                 FldRef.VALUE := Date;

               END;

             END;

     

    After:

     

          CASE Field.Type OF

            Field.Type::Decimal:                                             // # 4 Add line

              BEGIN                                                              // # 4 Add line

                IF EVALUATE(Decimal,Value) THEN BEGIN      // # 4 Add line

                  Value := FORMAT(Decimal,0,XMLFormat);     // # 4 Add line

     

                  FldRef.VALUE := Decimal;                           // # 4 Add line

                END;                                                           // # 4 Add line

              END;                                                             // # 4 Add line

            Field.Type::Date:

              BEGIN

                IF EVALUATE(Date, Value,XMLFormat) THEN BEGIN

                  Value := FORMAT(Date);

                  FldRef.VALUE := Date;

                END;

              END;

     

    * Codeunit 5302, Function TextToDecimal

    ----------------------------------------

    Before:

     

    InputText := CONVERTSTR(InputText,'.',',');

    IF STRPOS(InputText,',') = 0 THEN

      EXIT;

    PartArray[1] := GetSubStrByNo(1,InputText);

                                                                                

    After:

    InputText := CONVERTSTR(InputText,'.',',');

    IF STRPOS(InputText,',') = 0 THEN BEGIN                         // # 4 Add BEGIN

      IsConverted := TextToInteger(InputText,IntegeralPart);       // # 4 Add line

      IF IsConverted THEN                                                      // # 4 Add line

        DecVar := IntegeralPart;                                              // # 4 Add line

      EXIT;

    END;                                                                            // # Add END

    PartArray[1] := GetSubStrByNo(1,InputText);

     

    Before:

     

    DecVar := IntegeralPart + (FractionalPart / POWER(10,STRLEN(PartArray[2])));    

     

    After:

     

    IF STRPOS(InputText,'-') = 0 THEN  // # 5 Add line

      Sign := 1       // # 5 Add line

    ELSE        // # 5 Add line

      Sign := -1;      // # 5 Add line

    DecVar := (Sign * (ABS(IntegeralPart) + (FractionalPart / POWER(10,STRLEN(PartArray[2])))));  // #5 Change line

    *****End Code fix*****

     

     

    Laura K. Lake (lalake)

    Microsoft Dynamics NA


    Microsoft Customer Service and Support (CSS) North America

  • Microsoft Dynamics NAV Team Blog

    E-mail logging and The call to member Logon failed. Collaboration Data Objects returned following message: [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]

    • 0 Comments

    In 90% of the E-mail logging errors I personally dealt with, the logon error is the most common error being filed by partner followed by The call to member Sender Failed. Collaboration Data Objects returned the following message: Collaboration Data Objects E_ACCESSDENIED(80070005). Both errors are annoying and a bit complicated to explain why this could occur.

    Let's assume for one minute yo have followed the following article:

    942793 How to set up e-mail logging in Microsoft Dynamics NAV 5.0
    https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;EN-US;942793

    The article indicates the E-mail logging should work by now. Fact is that the E-mail logging will probably not work and the above mentioned errors are logged. What did you do wrong? The answer is: "Nothing". Some more steps needs to be taken. Let me first describe what we need for the setup of E-mail logging.

    1. We need an Exchange 2003 or Exchange 2007 environment
    2. We need a dedicated NAS PC / Server with Outlook and Dynamics NAV client installed

     IMPORTANT NOTE:
    The NAS server with Outlook installed cannot be the Exchange Server computer:
    266418 Microsoft does not support installing Exchange Server components and Outlook on the same computer
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;266418

    3. We need a client PC plus Outlook
    4. We need a dedicated user account (let's call this account "e-mail logger") that is a SUPER user in NAV and local Admin on the NAS server / PC
    5. We need a user account for testing the E-mail logging
    6. We need the Outlook Security Settings form that ships with the ORK 2003

    IMPORTANT NOTE:
    If using Exchagne 2007, please do see the following blog I wrote earlier:
    http://blogs.msdn.com/nav/archive/2008/05/09/e-mail-logging-when-using-outlook-2007.aspx

    To avoid the MAPI_E_LOGON_FAILED error mesage, please do the followiung:
    - log on to the server or PC running NAS "using the "e-mail logger" user account 
    - configure the NAS MMC with the required properties, MAILLOG in NAV 4.0 and earlier releases and JOBQUEUE in NAV 5.0 and later releases
    - make sure the NAS service is configured with the "e-mail logger" user account via services.msc
    - create an Outlook profile for the "e-mail logger" user account => delete all other existing Outlook profiles
    - create two Public Folders for Storage and Queue

    IMPORTANT NOTE:
    Creating the two folders while being logged on as the "e-mail logger user" account means that the two folders have the "e-mail logger" user account as the owner. If the "e-mail logger" user account does not have permissions to create Public Folders, then have the Exchange Admin do this and have him manually add the "e-mail logger" user account as the orignal owner via Client Permissions within the properties of the Public Folders

    - start up Dynamics NAV client and configure the E-mail logging properties in Marketing Setup

    In general circustances, this will prevent the MAPI_E_LOGON_FAILED error messages. The NAS has direct access to the Outook Profile via the "e-mail logger" user account and the folder permissions are set OK. As the Dynamics NAV client runs on a different machien, just leave the NAS and the Outlook client running on the dedicated box.

    Most partners now get the other error message: The call to member Sender Failed. Collaboration Data Objects returned the following message: Collaboration Data Objects E_ACCESSDENIED(80070005). I will probably dedicate another full blog on that topic, but in general this can be caused by missing or ignored Outlook Security Settings form and / or Exchange Server allowing messages to come in without Sender. NAS cannot handle those message and will log the permissions error. The process will halt after that and the Queue folder will be filled with messages if an automatic way of filling the queue folder was selected.

    Also see this blog:
    http://blogs.msdn.com/nav/archive/2008/05/09/e-mail-logging-when-using-outlook-2007.aspx

    -- mmels

  • Microsoft Dynamics NAV Team Blog

    Using web services with Outlook Synchronization in a localized environment

    • 0 Comments

    While using NAS with OSYNCH parameter in a Dynamics NAV 5.0 + partnersource update 25874 or Dynamics NAV 5.0 SP1, we had to use the Localization Tips that were published on page 55 of the Setup and Installation Guide:

    When a localized version of Microsoft Dynamics NAV is used, some actions are required to align the version and country codes specified in the license (.flf) and system text (.stx) files of Microsoft Dynamics NAV C/SIDE Client, Application Server, and Outlook Add-in with the localization used.

    Important

    When you install Outlook Synchronization Update, the described alignment must be performed only after you have imported and compiled the Outlook Synchronization Update objects.
    For the details on installing the Outlook Synchronization Update, please refer to the Installing Outlook Synchronization Update appendix.

    Using SP1 this process could be easy. Using the Partnersource update, this could be a bit more difficult because at what point did you have to import the modified objects and compile them (see Note above). Using web services, this changed which is a BIG win for all of us.

    When using web services, the NAS is no longer required and there is no need anymore to copy the license and system text files manually anymore. After installing everything required and after publishing the web service in NAV, the following error will show up in the Outlook Add-in:

    NST Asynch Call completed with Error: Microsoft.Dynamics.Nav.Types.Exceptions.NavCSideException: A '=' is missing in TransferFormulaData.  WHERE(Soort=CONST(-1),Verkoper=CONST(EMS)); .

    NOTE: example has been taken from Dutch NAV 2009 CTP4.

    This is an error coming while executing the web service call to the NST (NST Asynch Call). The message we are receiving is in english, therefore it means the NST its working in english and you are filtering using translated field values in Dutch, e.g. Verkoper (Salesperson). 

    This means that you need to change the language of the NST. You do that through the Role Tailored Client, so no stx file mambo jambo anymore :-)
     
    One thing to keep in mind though, is that the values of the filters you put in the entities, are language dependent. That means that they will not change values if you suddenly change the language of the NST or NAS or classic client. You can test this on a local build by, first opening NAV on the language of the local build (let's say Dutch) on a fresh database, open the Outlook Sync. Entities or Outlook Synch User Setup tables. This will populate default values in the current language. Now, change the language into English, you’ll see that the field values are still on the local language. This can be solved actually but is a new feature.

    -- mmels 

  • Microsoft Dynamics NAV Team Blog

    An error has occurred during the synchronization process

    • 0 Comments

    After configuring demo entities TASK and APP in NAV and after creating a ToDo of Phone Call and / or after creating a ToDo of Meeting, there is an error in the Outlook Add-in:
    An error has occurred during the synchronization process. You can find the error details in the log file. Please contact your System Administrator.

    After enabling the debug log file, the following can be seen in the debug log file:

    Error: 25-09-2008 08:06:57 [4] Dump of exception type 'System.NullReferenceException'
    Message: Object reference not set to an instance of an object.
    Stack trace:    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.OutlookModelProvider.OutlookObject.GetPropertyReturnedType(String propertyName)
       at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser._ProcessElement(SynchronizationSchema synchronizationSchema, NavisionSynchronizationEntity navisionSynchronizationEntity, String synchronizationEntityCode, OutlookItem item, XPathNavigator elementNavigator, String navisionRecordId, ProcessedItemStatusStruc& processedItemStatusStruc)
       at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser._ProcessOutlookItem(XPathNavigator outlookItemElement, SynchronizationSchema synchronizationSchema, NavisionSynchronizationEntity navisionSynchronizationEntity, OutlookSynchronizationEntity outlookSynchronizationEntity, EntryIdStorage entryIdStorage, Boolean isConflictResolution)
       at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser.GetNextMessagePortion()
       at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common._ProcessNavisionData(MemoryStream incomingStream)
       at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common.DoSynchronization(BackgroundWorker worker, DoWorkEventArgs e)

    Outlook collections contain an incorrect translated value for links.

    To resolve the issue, you can do the following:
    1. remove all TASK and APP entities from Outlook Synch User Setup
    2. select Outlook Synch Entities
    3. select Code and press F6
    4. select APP
    5. select Outlook Collection other then Recipients
    6. press F6 and select Links manually and press OK
    7 select Code and press F6
    8. select TASK
    9. select Outlook Collection
    10. press F6 and select Links manually and press OK
    11. reenter the TASK and APP entity for the selected Users in the Outlook Synch User Setup
    12. register changes in Change Log

    -- mmels 

  • Microsoft Dynamics NAV Team Blog

    Outlook Add-in does not show up in Dynamics NAV 5.0, Dynamics NAV 5.0 SP1 and Dynamics NAV 2009

    • 0 Comments

    Sometimes it happens that after a reinstallation of the Outlook Add-in, the actual toolbar does not appear in Outlook. The toolbar can however be seen as a separate toolbar under View / Toolbars. The actual cause is that previous Outlook Add-ins were still active previous to the reinstallation.

    To resolve the issue, do the following:
    1. within Outlook, select Tools in the menu
    2. select Trust Center
    3. select Add-ins
    4. select Apply macro security settings to installed add-ins
    5. verify that COM Add-ins is selected
    6. press Go
    7. if the Microsoft Dynamics NAV Synchronization Add-in is selected, deselect it
    8. press OK
    9. within Outlook, select Tools in the menu
    10. select Trust Center
    11. select Add-ins
    12.  select Apply macro security settings to installed add-ins
    13. verify that COM Add-ins is selected
    14. press Go
    15. select the Microsoft Dynamics NAV Synchronization Add-in is selected
    16. press OK

    The Outlook Add-in toolbar should now be visible again.

    - mmels

  • Microsoft Dynamics NAV Team Blog

    The asymmetric stream

    • 0 Comments

    Since NAV’s Stream introduction, there has been confusion about when to use READ and when to use READTEXT; when to use WRITE and when WRITEXT.

    As it is documented, InStream.READ  and OutStream.WRITE are meant to be in binary format, which means that Text strings will be ‘zero terminated’ when written, and a ‘zero terminated’ is expected when you are using READ; however READTEXT will not expect a ‘zero terminated’ text, but can accept one.

    This very last feature makes the streams asymmetric, as you can write different binary formats than what you can read.

    Take the following code snippet:

    Streams code

    If we examine the file that gets created (in a binary text editor), you will notice that the Texts are in fact ‘zero terminated’, but the READTEXT will be able to read them individually.

    Now, this is where the fun begins. We can change the READTEXT to be READ (as it should have been) and everything will continue to work exactly the same…, almost. You will notice that the readCount now (when using InS.READ) will include the zero termination, whereas before the count was only for the characters in the text. Actually, if you put a return value in the WRITE (char 13), you will notice that the zero termination is included in the count (because actually that was the binary format of the Text).

    So, count in count := OutS.WRITE('My text.'); will be 9 (8 characters and a zero termination), whereas count := OutS.WRITETEXT('My text.'); will be 8. The reason why it was decided to return the written bytes, was precisely so that people would know how many bytes are sent through the Stream.

    Another thing to take in consideration when working with Streams are CODE types. When writing CODE types using OutStream.Write, they are NOT written in NAV binary format. So they are not symmetric with the FILE.WRITE function; however, InStream.READ(CodeType) will accept either data written using OutStream.WRITE(CodeType), or FILE.WRITE(CodeType).

    Another possibility is to write data using OutStream.WRITETEXT(Text) and read it via InStream.READ(Text). Just take in consideration that when using OutStream.WRITE(Text), the Text will be zero terminated and when using OutStream.WRITETEXT(Text), it will not. 

    Jorge Alberto Torres (jtorres)
    Software Developer Engineer

  • Microsoft Dynamics NAV Team Blog

    Simple query to check the recent performance history II - now including Query Plan information

    • 0 Comments

    One of the queries I use the most, is the pplan-cache query from this post:

    Simple query to check the recent performance history

    The good thing about the query is that it shows information that could otherwise require a lot of work (collecting and analysing traces files). And the query does not need any advance work or setup. It can just be run. So it's a very easy way to receive information from a system, which is often very useful as a first step in troubleshooting performance. For more details about the result of the query, refer to the post linked above.

    Below is a slightly enhanced version of the query. Since the query is based on the cache of compiled query plans, it is not a big step to extend it to also include the query plan itself, and even extract certain information from the plan if you know what you are looking for.

    So this query does the same as the original one, but with the following additions:

    • New column query_plan is included. It shows the query plan as xml which may be difficult to read, but it contains the full plan. Note: Some times, for no apparent reason, the query plan can't be retrieved, so it may not show the query plan on all lines.
    • cursor_type, just as an example of how to retrieve data from the query plan. If you find other things in the plans that may be interesting, then use the syntax to retrieve this further information.

    Here is the updated query

    SELECT TOP 100

    SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,

    ((CASE statement_end_offset

    WHEN -1 THEN DATALENGTH(st.text)

    ELSE qs.statement_end_offset END

    - qs.statement_start_offset)/2) + 1) as statement_text,

    execution_count,

    case

    when execution_count = 0 then null

    else total_logical_reads/execution_count

    end as avg_logical_reads,

    last_logical_reads,

    min_logical_reads,

    max_logical_reads,

    plan_handle,

    ph.query_plan,

    -- Query Plan Information

    case when

    ph.query_plan.exist('declare namespace ns="http://schemas.microsoft.com/sqlserver/2004/07/showplan";(/ns:ShowPlanXML/ns:BatchSequence/ns:Batch/ns:Statements/ns:StmtCursor/ns:CursorPlan/@CursorRequestedType)[1]') = 0

    then '' else

    ph.query_plan.value('declare namespace ns="http://schemas.microsoft.com/sqlserver/2004/07/showplan";(/ns:ShowPlanXML/ns:BatchSequence/ns:Batch/ns:Statements/ns:StmtCursor/ns:CursorPlan/@CursorRequestedType)[1]','nvarchar (max)')

    end as cursor_type

    FROM sys.dm_exec_query_stats as qs

    CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) as st

    CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) as ph

    ORDER BY max_logical_reads DESC

    :

     

    What I would really like, is to receive feedback on what parts of the query plans are useful. Then extend the query even further to include as much useful information as possible. For exdample, in some cases the query plan contains missing index-information. The lines below can be copied into the query above to include this information. Any feedback on whether this is useful or not, and whether other information from the query plans can be useful is really very welcome. You can add comments about this below.

    -- Missing Indexes

    ,case when ph.query_plan.exist('declare namespace ns="http://schemas.microsoft.com/sqlserver/2004/07/showplan";(/ns:ShowPlanXML/ns:BatchSequence/ns:Batch/ns:Statements/ns:StmtSimple/ns:QueryPlan/ns:MissingIndexes/ns:MissingIndexGroup)[1]') = 0

    then ''

    else ph.query_plan.value('declare namespace ns="http://schemas.microsoft.com/sqlserver/2004/07/showplan";(/ns:ShowPlanXML/ns:BatchSequence/ns:Batch/ns:Statements/ns:StmtSimple/ns:QueryPlan/ns:MissingIndexes/ns:MissingIndexGroup/@Impact)[1]','nvarchar (max)')

    end as missing_index_impact,

     

    case when ph.query_plan.exist('declare namespace ns="http://schemas.microsoft.com/sqlserver/2004/07/showplan";(/ns:ShowPlanXML/ns:BatchSequence/ns:Batch/ns:Statements/ns:StmtSimple/ns:QueryPlan/ns:MissingIndexes/ns:MissingIndexGroup/ns:MissingIndex/@Table)[1]') = 0

    then ''

    else ph.query_plan.value('declare namespace ns="http://schemas.microsoft.com/sqlserver/2004/07/showplan";(/ns:ShowPlanXML/ns:BatchSequence/ns:Batch/ns:Statements/ns:StmtSimple/ns:QueryPlan/ns:MissingIndexes/ns:MissingIndexGroup/ns:MissingIndex/@Table)[1]','nvarchar(max)')

    end as missing_index_table,

    case when ph.query_plan.exist('declare namespace ns="http://schemas.microsoft.com/sqlserver/2004/07/showplan";(/ns:ShowPlanXML/ns:BatchSequence/ns:Batch/ns:Statements/ns:StmtSimple/ns:QueryPlan/ns:MissingIndexes/ns:MissingIndexGroup/ns:MissingIndex/ns:ColumnGroup/ns:Column/@Name)[1]') = 0

    then ''

    else ph.query_plan.value('declare namespace ns="http://schemas.microsoft.com/sqlserver/2004/07/showplan";(/ns:ShowPlanXML/ns:BatchSequence/ns:Batch/ns:Statements/ns:StmtSimple/ns:QueryPlan/ns:MissingIndexes/ns:MissingIndexGroup/ns:MissingIndex/ns:ColumnGroup/ns:Column/@Name)[1]','nvarchar(max)')

    end as missing_index_field

     

    Lars Lohndorf-Larsen (Lohndorf)
    Escalation Engineer

  • Microsoft Dynamics NAV Team Blog

    Debugging in NAV 2009

    • 3 Comments

    UPDATE 25 August 2010! You cannot use the Express version of Visual Studio 2008 SP1 to debug Microsoft Dynamics NAV 2009. However, a useful and free visual debugger with slightly limited functionality - DbgClr.exe - can be downloaded as part of the .NET Framework 2.0 SDK: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec

    --- 

    UPDATE 18 December 2009! The most up-to-date version of this content is available in the Microsoft Dynamics NAV 2009 Developer and IT Pro Help on MSDN: http://msdn.microsoft.com/en-us/library/dd301071.aspx.

    ---

     
    UPDATE!!! Debugging is not available in the Marketing Beta, so if you have access to a later build you can try this out. If not you will have to wait for RTM.
    Also note that SP1 for either Visual Studio 2005 or Visual Studio 2008 is required.
    ---

    In this post I will give you a example on how to debug in NAV 2009.

    1. EnableDebugging in CustomSettings.config found here: C:\Program Files\Microsoft Dynamics NAV\60\Service

    image

    2. Now Restart the “Microsoft Dynamics NAV Server” service

    image

    3. Now we have debugging enabled. Now start the RoleTailored client. This will take a bit longer to start up, because C# files are generated for each of the objects. (Pages, Codeunits, Reports etc.)

    4. Now we need to find a place to debug. In this example I will make a codeunit with a simple message and add this to an action on the Customer list.

    5. Create a Codeunit. Ex. 50000

    6. OnRun trigger place the following code: MESSAGE ('Debug test')

    image

    7. Save and compile Codeunit 50000.

    8. Now let us add this codeunit to a action. Design page 22 and navigate to the Actions on page 22.

    9. Insert a new action below the the Customer Action group

    image

    10. Hit F9 and enter this code on the Debug test -  OnAction trigger: CODEUNIT.RUN(50000);

    image

    11. Save and compile page 22

    12. OK we now have all code completed so now let us set a breakpoint in Visual Studio.

    13. Navigate to “C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit”

    14. Assuming that you have Visual Studio installed, (In my case I’m using Visual Studio 2008 with SP1) open Codeunit50000.cs

    image

    15. If you have UAC turned you will need to open Visual Studio with “Run as administrator”.

    16. Now we need to attach the NAV service. Select “Debug / Attach to process…”

    17. Attach Microsoft.Dynamics.Nav.Server.exe

    image

    18. Your screen should now look like this:

    image

    19. Now add a break point on the message “Debug test”

    image

    20, With this done now let us go to RoleTailored client.

    21. Navigate to Customer List and see that you have a new action called “Debug test” under “Related Information”

    image

    22. Now select “Debug test”

    23. Visual Studio will come back in focus with the breakpoint selected.

    image

     

     

     

     

     

     

     

     

     

     

     

    24. Now try to hit F5 and debugging will continue and RoleTailored client will come back in focus and show the message “Debug test”:

    image

    Thanks,

    Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV

  • Microsoft Dynamics NAV Team Blog

    Action and Activity Button icons in Microsoft Dynamics NAV 2009

    • 0 Comments

    Update!!! Please find an updated list of icons available here:

    Regards,
    Claus

    ******

    First, if you have not downloaded the just released Marketing Beta for Dynamics NAV 2009, this can be downloaded from here. Requires access to Partner Source.

    In the Marketing Beta for Dynamics NAV 2009 you will find new walkthroughs for how to create Pages for the new RoleTailored client.

    But one thing that you can not find in the “nav_adg.chm", are what icons you can use in the RoleTailored client, because this topic will be added later.

    So to save you the time reverse engineering the Demo Database to create this list, if you are to create a new page, let me share these icons with you.

    But first let me give you an example on a Action and an Activity Button. If you already are familiar with this, you can skip to the end of this blog, where all the icons are listed.

    Example of an Action in Page Designer:

    1. Open Object Designer

    2. Navigate to the new Page object

    3. Design page 22, Customer List

    4. Navigate to the bottom of the page to access the Page Object itself

    5. Right click and select “Actions”, you view should now look like this:

    image

    6. You are now looking at the Action Designer which is captured inside the Page Designer.

    7. Scroll down to <Action58>, Bank Accounts and select properties on this action. Your view should now look like this:

    image

    8. The most important property here is the “RunObject”, which tells which object are activated, when this Bank Accounts action is clicked, but for this blog I’m concentrate on the “Image” property so I will not go into more detail for the “RunObject”. Notice that the Image property is undefined. So how will this action actually look in the RoleTailored client if no image is associated to this action? Let us promote this action and see.

    9. Set “Promoted” to Yes

    10. Set “PromotedIsBig” to Yes

    11. Save and compile page 22.

    12. Open RoleTailored client.

    13. Navigate to the Customer List, if you have the Customer List open already, just refresh the list by clicking“Refresh” in the top right corner. You will now see your “Bank Accounts” action promoted with the default icon used. The default icon will be used when the Image property has not been set:

    image

    14. Now let set the “Image” property on the “Bank Accounts” action. Go back to the Action Design for Page 22 and select the properties for the “Bank Accounts” action.

    15. Set the “Image” property to “BankAccountStatement”

    16. Save and compile page 22.

    17. Refresh Customer List in RoleTailored client and your icon for “Bank Accounts” action will now look this.

    image

    Now let us look at an example of an Activity Button in Page Designer:

    1. Activity Buttons belongs to the RoleCenter so to create or modify an Activity Button we need to be designing a Page of PageType “Rolecenter”. So let us look at page 9006.

    2. Design page 22

    3. As for the Actions the Activity Buttons are also found in the Action Designer, so Navigate to the bottom of the page to access the Page Object itself.

    4. Right click and select “Actions”, you view should now look like this:

    image

    5. Instead of modifying an existing Activity Button as we did for the Action above, let us create a new one.

    6. Navigate to the ActionContainer ActivityButtons area of the Action Designer:

    image  

     

    7. Role Center 9006 has one Activity Button called “Posted Documents”. Let us create a new Activity Button call “Bank” just above “Posted Documents”. Place your cursor on “ActionGroup” “Posted Documents” and press F3.

    8. A new line is created. Set “Caption” to “Bank” and “Type” to “ActionGroup”

    9. Open properties and set “Image” property to “Bank”.

    10. Make sure that the 2 ActionGroups “Bank” and “Posted Documents” are at the same indention level. You might need to move “Bank” to the right to align with “Posted Documents”.

    11. We could stop now and see the Activity Button in RoleTailored client, but let us add an action to this new Activity Button, so we actually have something happening when you click the Activity Button “Bank” in the RoleTailored client.

    12. Create new line bellow, the “Bank” “ActionGroup”, and set “Caption” to “Bank Accounts” and “Type” to “Action”. Make sure that this action is indented one level in from the ActionGroup  above.

    13. Open properties for “Bank Accounts” and set “RunObject” to “P371” (Page Bank Account List)

    14. Now restart RoleTailored client to see your new Activity button. Note: Refresh does not work in Activity Button area of the Role Center, so you will need to restart the RoleTailored client to see your “Bank” Activity Button. Hopefully this we be solved in a future build, so you don’t need to restart to see your changes made in Page Designer. :-). After the restart you RoleTailored client should now look like this:

    image

    So now you have seen how to set the “Image” property on an Action and an Activity Button, let us see the icons you can use.

    Icons which can be used for Actions:

    Removed please use online help: http://msdn.microsoft.com/en-us/library/dd568728.aspx

    Icons which can be used for Activity Buttons:

    Removed please use online help: http://msdn.microsoft.com/en-us/library/dd568709.aspx

    Thanks,

    Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV

  • Microsoft Dynamics NAV Team Blog

    List of released updates for SQL Server 2005 SP2

    • 0 Comments

    The link below lists build numbers, KB numbers and links to cumulative updates updates 1 to 9 for SQL Server 2005: 

    List of build numbers and cumulative updates 1-9 for SQL Server 2005

     

     Also see this post for relevance of SQL Updates to Microsoft Dynamics NAV:

    Overview of updates for SQL Server 2005 SP2

     

    Lars Lohndorf-Larsen

    Microsoft Dynamics UK


    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV 5.0 Documentation Source Files Available to Partners

    • 4 Comments

    Earlier this year, Michelle, my colleague on the Microsoft Dynamics NAV documentation team, wrote a blog post about improvements that we have made to the content for Microsoft Dynamics NAV 2009. In addition to improving the product documentation, we are also working to improve how partners can customize and extend the Help.

    In April, we published all of the Microsoft Dynamics NAV 5.0 platform documentation to the Microsoft.com Download Center. And now, we are releasing all of the source files for Microsoft Dynamics NAV 5.0 application Help on PartnerSource (log-in required). When Microsoft Dynamics NAV 2009 is released, we’ll also provide the new application Help source files on the same schedule as the localized releases.

    Providing our partners with the documentation source files is only a first step toward improving Help customization. Feedback that we have heard is that the Online Help Guide (available on PartnerSource) is daunting. For Microsoft Dynamics NAV 2009, we will be replacing this guide with a streamlined version focused on what you need to do to customize and build documentation for your Microsoft Dynamics NAV solution or add-on.

    We are also updating GATE for Microsoft Dynamics NAV 2009. While the functionality will be very similar to what you are using today, we’ll be making GATE more robust and easier to use by rewriting it as a .NET application.

    Given the amount of time that we have left in this product cycle, these tactical changes are what we can provide in the Microsoft Dynamics NAV 2009 timeframe. You can continue to use RoboHelp (or your favorite HTML or Help authoring tool) to create Help. Over the coming months we will be developing our post-Microsoft Dynamics NAV 2009 strategy for improving Help customization. Based on what we heard at Convergence in March and in one-on-one discussions with several partners, we will be focusing on the following themes:

    • Developing an easy mechanism to create and edit documentation, for example, Microsoft Word.
    • Providing more procedural content which you can customize for your solution or add-on.
    • Enabling you to create Help for objects.

    We’d like to continue to hear what your needs are, so we can ensure that we are improving the process for customizing and extending Help. You can add your comments below or e-mail us at navhelp@microsoft.com. Here are some questions to get you started:

    • How do you use the content that we provide?
    • What types of Help do you provide to your customers to assist them in using your solution?
    • If you don’t provide your customers with customized Help, what are the main reasons for not doing this? How does this impact your support costs?
    • How will you use the source files for all of our Help, in all available languages? Will you customize these CHMs? Repackage Help into another format? Or do something else?
    • Do you extend Help with information about the changes that you have made to Microsoft Dynamics NAV, such as new tables, forms, pages, etc.? How important is it to be able to extend Help? What would make this scenario more efficient for you?
    • Have you used the Online Help Guide toolkit? How well did it help you accomplish Help customization?
    • Do you know that we removed Company Notes in Microsoft Dynamics NAV 5.0 and why? Were you using Company Notes? What worked for you about this solution? What didn’t work?
    • If you customize the content that we provide, how do you determine what has changed from version to version?

    It’s important for us to ensure that we are providing an efficient way for you to customize the documentation. We’re looking for volunteers to test our new Help processes, and provide us with feedback on how well these solutions meet your needs. In return, we’ll offer extra assistance in using these processes. If you would like to participate, please e-mail navhelp@microsoft.com.

    - Paul Chapman

  • Microsoft Dynamics NAV Team Blog

    New Drop Down window in Microsoft NAV 2009 using Fields Groups

    • 4 Comments

    I have now been asked many times how the new Drop Down window in Microsoft NAV 2009 is defined, so let me give you an example on how this works.

    In this screen dump, I have just clicked the Drop Down arrow on the field ”Bill-to Customer No”, on the Customer Card, and our new Drop Down window appears displaying the columns No., Name, City, Post Code, Phone No. and Contact.

    image

    So how do I define that when I click “Bill-to Customer No.” it displays a Drop Down? And how are the columns defined which are displayed in the Drop Down?

    Let us look at a field which actually shows a List page and change this field to show a Drop Down. This could be ex. “Post Code” also found on the Customer Card.

    Let us see what happens when I click “Post Code”:

    image

    So in standard NAV 2009 we show a List page where the use can select from the available Code and Cities found in the demo database. I would like to change this into a Drop Down so let us go into the Object Designer and explorer why I shown a List page when clicking the Post Code field.

    My first thought is to look at Page 21 in the Page Designer and look at the properties for “Post Code”:

    image

    But since nothing is specified on the “Lookup” property this must be on table level. In table 18 you find the following code  “PostCode.LookUpPostCode(City,"Post Code",TRUE);

    image

    With this on the OnLookup trigger we will show a List page and not a Drop Down, so let us delete what is on the OnLokup trigger and see how the “Post Code” fields now behaves in the RoleTailered client:

    image

    So now I got my Drop Down on “Post Code” but I actually want to sort the columns different and add other columns to the Drop Down. To do this I used a new thing we call “Fields Groups”.

    Since when I look at the “Post Code” on the customer card we actually lookup in Post Code table 225, so to change the columns displayed we need to look at this table, so back to Object Designer and design table 225.

    In design mode click “View” and notice a new field called “Field Groups”. Notice that this is blank, so the “Code” and “City”  which are displayed in Drop Down above are shown because these fields are Primary Keys specified on the Table.

    image

    Now let us define the columns shown in the Drop Down window of “Post Code”.

    In the Name type “DropDown” and in group select the assist button and select City, Code and City Search:

    image

    Your Field Group should now look like this:

    image 

     

     

     

     

     

     

    Now compile table 225 and go back to your Customer Card. If you had one open already you will need to reopen since we have changed the underlying data.

    Your Drop Down now displays like this:

    image 

    We have now completed created our new Drop Down window, but before I end this blog I would to like show you a bit more what you can do with this Drop Down.

    I have been been in the NAV group for almost 10 years now so I’m a keyboard shortcut addict so let me show a small tip.

    While standing on the “Post Code” field press “ALT+ARROW DOWN”, Drop Down will show up.

    Now type “New”. The Drop Down will now be sorted on all cities starting with “New”:

    image

    You might have noticed that “City” is bold in the Drop Down. This signals that the Drop Down will be searched based on upon the field “City”. So in this case when we type “New” we will see the Cities which start with “New”

    Now let us make “Code” the default.

    Press “ARROWDOWN” to get down into to Drop Down.

    Press “ARROWRIGHT” to get to the “Code” column. Notice that “Code” now becomes bold, and if you are still searching on “New” the list will become blank:

    image

     

    Now type “US“ and your Drop Down window will now be sorted on all codes which is starting with “US“:

    image

    Also notice that “Code” going forward will be column to sort on as this information is stored in the Personalization store.

    So here you have it, my first blog ever.

    Thanks,

    Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV

  • Microsoft Dynamics NAV Team Blog

    NAV 2009 - Where is the zup file?

    • 0 Comments

    In previous versions, all local client settings are stored in the .zup file. In Microsoft Dynamics NAV 2009, this is a bit more complex. This post tries to describe which settings are stored where.

    In addition to that, with NAV 2009 you may be spending a lot of time looking for files with long folder-names. So this post also shows you the location of each file, to make it quicker to find them.

     

    /// Blog updated October 2nd: Section "temporary server files" updated with path for Windows Server 2003.

    Setup files and tables in NAV 2009

    In NAV 2009, settings are stored in various places. The following lists what is stored where. some settings are stored in files, and some in tables. I hope I have included everything here. But if the list should be incomplete, I would appreciate comments at the end of this post.

     

    Client side:


    PersonalizationStore.xml
    stored in:
    %AppData%\Microsoft\Microsoft Dynamics NAV\

    This file stores some personal settings for the client like resizing of columns. It is probably the closest thing to the old zup file there is. The data in this file is primarily binary because it it not supposed to be updated manually. Even if you could edit the file (if you could find the settings you wanted to edit), then this is unsupported. But, like the old zup file, you can delete or rename it, and next time the client opens, it will create a new one.

    ClientUserSettings.Config
    Stored in:
    %ProgramData%\Microsoft\Microsoft Dynamics NAV\

    This file is where you can set RTC to connect to a specific service tier and/or a specific port.

    Server side:

    CustomSettings.config
    stored in (default):
    C:\Program Files\Microsoft Dynamics NAV\60\Service\
    This is where you set up parameters for the Service Tier like SQL Server name, Database name, port number etc.

    temporary Server files
    Stored in:
    %ProgramData%\Microsoft\Microsoft Dynamics NAV\60\Server

    /// Update

    The path above is for a Vista OS. If you run NAV server on Windows Server 2003, the path is:

    C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\

    /// -----

    The service tier uses this folder for various temporary files. It is definitely not recommended to change any files here! But it might be a place for troubleshooting certain problems (though I am not sure what kind of problems).

    Tables:


    2000000075 - "User Metadata"
    When you go to "Customize this page", then it's stored here.If for example a user ads new parts, like a chart or does anythign else herel,this table contains one record for each urse, for ach pae that they have persinalised.

    2000000071 - "Object Metadata"
    This table stores all the objects for RTC. Whenever you compile an object, it transforms it to a format that is designed for RTC and stores it in this table. You can delete entries here, though I would not recommend it. But if you do, and want it back, then compile the missing object from Object Designer. The data in this table is generally binary, so also not something to modify and definitely not necessarily supported or documented.

     

    Lars Lohndorf-Larsen (Lohndorf )
    Microsoft Dynamics UK
    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Session Monitor for SQL Server 2005

    • 0 Comments

    Session Monitor is not a new tool, but it did stop working with SQL Server 2005. So I think that a lot of people stopped using it, which is a shame. The things that were broken now work again, and I would recommend anyone with any kind of blocking problems to implement this tool. With this post I hope to get some people to use it again, and to provide a new tool to anyone who did not know it exists.

    Purpose of the tool

    The purpose of the Session Monitor tool is to show a live picture of any current blocks in the Microsoft Dynamics NAV database. And to show it in a familiar environment, i.e. a NAV form. It is an extension of the information you get when going to File -> Database -> Information, and drill down on Sessions.

    What the tool does:

    • Shows live information about who is blocked by whom
    • Shows which user is at the top of a blocking chain
    • Shows if a user is involved in blocking, i.e. either being blocked or is blocking someone. So you can filter out all sessions that are not involved in blocking
    • Shows the wait resource, i.e. on which table the block is

    This is how the Session Monitor shows a blocking situation:

    SessionMonitor

    As default it refreshes every second.

    Some of the useful features of Session Monitor are:

    • Filter on "Involved in Blocking". Then, as soon as there is a block it will show up. This is especially useful when you have more sessions that can fit on the screen, which means that there might otherwise be a block outside of the form.
    • Wait Resource tells you on which table the block is, which helps you get some idea about in which area of the application it is.
    • Originating blocker ID shows the head-blocker. This is useful when a user is blocked by someone who is blocked by someone else, etc.
    • Wait Time shows how long the block has been there.

    How to get it to work

    As mentioned, the tool stopped working in SQL Server 2005. But there are corrections for this now. First, download the tool, which is part of the "Performance Troubleshooting Guide", available for download here (PartnerSource login required):

    Microsoft Navision SQL Resource Kit

    The original tool contains a SQL query (Session Monitor (SQL Server).sql) which is the part that doesn't work for SQL Server 2005. So don't run this query.  Run the query from this KB article instead (PartnerSource login required here too):

    KB 933042 - Error message when you use the Session Monitor feature in Microsoft Dynamics NAV: "Invalid length parameter passed to the substring function"

    Note!: Run the query on the NAV database - not on Master, or any other database you have on SQL Server.

    In NAV, import the object "Session Monitor (SQL Server).fob" from the Performance Troubleshooting guide.

    Make one change - otherwise in some cases it will fail with an INSERT error:

    Design codeunit 150011 "Session Monitor Mgt. (SQL Srv)", and replace this line:

    RefreshUserActivity()
    SELECTLATESTVERSION;
    IF Session.FIND('-') THEN
      REPEAT
        SessionTmp := Session;
        // SessionTmp.INSERT; Remove this line and replace with:

        IF SessionTmp.INSERT THEN ; // New line  
      UNTIL Session.NEXT = 0;

    Those are the changes needed to get it to run on SQL Server 2005,

    Lars Lohndorf-Larsen (Lohndorf)
    Escalation Engineer

Page 41 of 47 (703 items) «3940414243»