Showing posts with label NAV 2009. Show all posts
Showing posts with label NAV 2009. Show all posts

Tuesday, July 17, 2012

RTC Client Random Crash - SOLVED!

In my last post RTC - Random Crash I talked about Role Tailored Client random crash on whole system, which could not be explained with any, lets just say, logical explanation. It crashed on all network stations except on Server and with SUPER user.

After cooperation with Microsoft and other consultants, we still didn't find root cause of this problem. Even after applying all newest hotfixes and installing latest build of NAV 2009 everything still crashed.

After a while, whole network crashed. We managed to trace root problem and it led to blade server UTP port. Problem was with UTP cabel which, somehow, got unplugged from port and disrupted ERP data flow. After checking cables and plugging in the cable, as it should have been plugged in, RTC stopped crashing and users were able to work properly.

There is one immediate question: Did classic client work all this time? Answer is: Yes.
As NAV 2009 RTC client requires more bandwidth than classic client, users managed to continue their everday work in classic client.

This goes to show that it isn't always problem with software.

Thursday, May 3, 2012

RTC Client Random Crash #1


There is something strange going on with new R2 RTC client.

For no reason what so ever, client started crashing on all end-user workstations. What happend? Is it firewall? Is it anti-virus? Is it trojan? We still don't know. Windows event viewer returned values through it's log which we can't interpret as much as we would like to. Can you maybe make something of this:


And is immediately followed by this error:


Possible Workaround , but still…

This error appears on every workstation except super user , and on server. We already tried to set permissions on file system, tried to redefine user roles, but no success. While searching Internet I found that other partners also had this issue. Some workaround can be achieved through compiling User Personalization table. That's right, compiling system table right on the users production server. After compiling this table you will (most likely or 100%) crush Microsoft.Dynamics.Nav.Server.exe. After that you just need to start Dynamics NAV Service and users wil be able to start their RTC clienst.
We are currently in close cooperation with Microsoft trying to resolve this issue with RTC client.
I honestly hope that my next post will be with topic like „SOLVED!“

Monday, April 23, 2012

DynamicsWorld Post

Another article from my blog has been published on MSDynamicsWorld.com: Dynamics NAV article. Many thanks to Jason, for contributing in it's publishing.

Thursday, April 19, 2012

Calling Classic Reports From RTC

Starting classic reports from the Microsoft Dynamics NAV role-tailored client (RTC) is a common end-user request. But the design of the RTC client itself didn't provide an easy way of calling these reports via GUI integration with specific business processes of end user. So to deliver on this customer request you have to do a little customization to expose these reports. In this article I'll show two little tricks of how to call classic reports without need of further thinking what data you're actually trying to show.

Dummy Game


The idea behind the "Dummy Game" is a simple trick of setting one dummy data set in as the first record set of a report. Basically this dummy data set will act as the data provider bookmark from the RTC client – or it will copy data from an RTC client row into report field as parameter.
In my example I'll use my custom report "Vendor balance“which will be called directly from the Vendor Card Page. It is basically a report we made for NAV classic reports and put it on the vendor card. The problem with this report was that it was still behaving like a classic NAV report despite advanced functionality of calling it directly from a vendor record. And the user needed to enter vendor data from vendor card from where it was called – a double job. So here's the dummy secret.
In first data set of the report we've placed the Dummy Data item.

The role of this dummy filter was to filter data of page that it was called from and set the filter for the report Record Set data. All of C/AL code is inserted into OnPreReport() trigger.

 
And that did the trick.
But while using this Dummy Game trick we noticed one additional misleading error which could be misleading for end user directing them to enter data into report request form even though it is not needed . All data transferred from RTC on to the classic report with this Dummy Game is not shown in report fields. In this example we transferred Vendor VAT No. And it was not shown on the request form of the report, but it was there because when we you start the report it really shows the record set of the bookmarked vendor. So the best approach is to remove this field from the request form.

Also there is another catch to this. Classic reports are meant (in true Dynamics NAV spirit) for users to enter as many as parameters or values in the request form fields as possible. In this case, when using the Dummy Game, you can call reports for only one record, or better said for the bookmarked record. So my recommendation is to really think if you want to use the Dummy Game or not. In the end it depends on the client's business processes and business requirements.

Page Record Filtering - Bookmarking


Another way of calling reports from RTC is with record filtering, or setting bookmark on the page itself. Unlike the Dummy Game where all the "trick" code is customized on report itself, here we are setting filters directly on the page. The trick in this classic report call is to set a filter on an action, which is calling the report. But no report customization is needed. A specific action is used for calling the report C/AL code that has been inserted into the OnAction() trigger.

This code runs through all of the records visible on the page and remembers the one that you've bookmarked. This trick is may be better than the Dummy Game approach in the sense that it cannot mislead end users and it shows all bookmark data in request form fields. The only drawback of this method is that the user can see how RTC is running code on page and highlighting every row as it passes through. In this method the user can also edit values in request forms and insert values as he pleases.

And in conclusion, before using any of these methods, it is best to consider all pros and cons of using filtering. I share these methods based on my perspective of upgrading classic NAV to RTC - when the user already has the experience, knowledge and routine of using classic report. And when implementing classic reports for a new NAV RTC user I would always go for one of these methods, depending on nature of report (as opposed to upgrading the report to RTC?).

Tuesday, March 27, 2012

NAV 2009 RTC Client Randomly Failed to Connect

This morning I had one strange issue while trying to connect my RTC client to data base.
Immediately after starting RTC client I got this error:

Type: System.AccessViolationException

After trying to give access rights to Microsoft.Dynamics.Nav.Client.exe, and giving extra admin rights to current user nothing did the trick. Then I started thinking that maybe there is problem on Service tier. Now it was time to change setup of services. I noticed that some of services are running under "Local Account", and some under "Network account". This was obligatory because I have more than one NAV Services. Since "Network account" gives so much trouble and is really delicate to maintain i decided to change every one service to run under local administrator account. After I changed this setting and restarted services everything went through.

Monday, March 26, 2012

NAV 2009 Platform Overview

Here are few links that You might find userful while working with NAV 2009 or troubleshooting:

Released Platform Hotfixes for Microsoft Dynamics NAV 2009

Wednesday, March 7, 2012

Dynamics World Support

I'm proud to say that portal Dynamics World has published my article about Dynamics NAV.

You can read blog directly on MSDynamicsWorld site.

Monday, March 5, 2012

SQL 2010 Login Error

Today I tried to test Dynamics NAV 2009 client on new SQL 2010 R0.

Installation went without problems, user creation also went without problem, and then I started classic client with task to create data base. Now problems started.

On my server I had two types of data base users: domain user (Windows authentication) and data base user.

Thing that bothered me was that I could log in with windows account but couldn't log in with database account.

After I verified all of SQL Server parameters, user permissions, and data base properties I found what was "wrong": SQL 2010 has new security feature that doesn't allow logging of accounts that have blank passwords.

Even thou your account has blank password with ALTER LOGIN function and even thou query returns Command(s) completed successfully You still won't be able to log in.

After setting passwords to my database account I was able to log in to SQL server and create/restore databases.

Friday, February 24, 2012

Zoom Functionality In RTC 2009 R2


Zoom is very handy function that all of NAV users, in very short time, learned what it and use it daily. In classic client Zoom function is started by pressing F8 button or using Tools menu function Zoom.
RTC client also has built in Zoom functionality but it's slightly different than old Zoom function.

Starting Zoom

You can start Zoom function by pressing Ctrl+Alt+F1 key kombination on current page or use standard windows function „Help > About“


 You can start Zoom function by pressing Ctrl+Alt+F1 key kombination on current page or use standard windows function „Help > About“

Zoom Data

After starting function RTC Zoom page will appear with more dana than old Zoom:
  • Page Information – information about page type, page mode, source table and current record.
  • Table fields – old Zoom data
  • Source Expressions
  • FlowFilter Fields – All flowFilter Fields on current form with applied filters

Sunday, February 19, 2012

Access NAV Server Through Multiple Different Domains

Accessing NAV Server Through Multiple Different Domains tends to be wery frustrating! Have you ever encountered situation where You needed to connect NAV RTC client from one domain to NAV Server which is on other domain? Well, I did. And I must say that this is kind'a BIG problem with international companies who have strong security policy.

Well, luckily Microsoft has server and infrastructure issues that came great in solving this problem.

When thinking about how to solve this problem main thing that came to my attention is how to transfer permissions from one domain to another with same users, and at the end how will those users authenticate to NAV server with Windows authentication. I must say that I was really surprised when I found out that windows recognizes users between domains as same users if they have same user name and password.

For start, lets assume that You have created users on NAV server which is in different organizational unit and different domain.

Active Directory Setup

Create users on Server in Active Directory with appropriate rights and in appropriate organizational unit.
When creating users remember that newly created users must have:
  • Same username as users on NAV Server
  • Same password users set up on NAV Server
When You’ve created user, just click Finish to apply newly created user.

To check if Your user is created as it should check your Organizational unit to see if Your new user is positioned in that Organizational unit.

SQL Server Setup

Create New login with Windows authentication. This user must be with same user name as the one on NAV server, but with domain where is SQL server.

Don't forget to Map user on appropirate NAV Database.

VIEW SERVER STATE on SQL ERROR

Now, users are created and theoretically they should be able to connect to SQL server – but not.
If You try to connect to database (and You have created users in NAV), You'll get View Server State Error.

Next thing is to set up Database properties and grant View Server State Permission to all users that need to connect to Your NAV Database.
To set up users edit Database Permissions on SQL Server Properties.


In upper part of Form You need to find user who You'll give that permission to. After You have found it You need to Grant Explicit permission to View Server State parameter in lower part of form.

Confirm setup with OK button and You're set.

Create Users in NAV

Following standard procedure in NAV create users with Windows Logins and with appropriate permissions.


When created, don’t forget to Synchronize them.


This principle is best used in companies who want to use NAV RTC client in their business, otherwise You can direct users to connect through Database logins.

Monday, December 26, 2011

Implementing Nmbering Series

Number series is feature in NAV that allows usage of numbering methods and also allows the application to work the same everythere.

This tutorial will explain how to implement Number Series in a new table or add them to existing table. First part of tutorial is focused on creating No. Series columns in tables, middle part of tutorial is focused on coding auomatization of No. Series and last part of tutorial is focused on creating function which will be used to drill down to numbering series line of our specific numbering series.

Another thing, best way for designing and developing NAV is using existing functions and code because they're already tested and probably working without bugs.

Step 1: Creating numbering series columns in a table


In our new / existing table You need to create this two columns (fields) which will be used for storing number series. First field (No.) needs to be created as primary key field.

Please name columns as in next table because of copying functions from other tables, and also this is standard naming policy for No. Columns and Number Series columns in NAV.

To create this fields, go to the object designer and create a new Table / design existing table.


Now our table should look like this.

Step 2: Compile table and add C/AL code


When implementing number series automation, there are some required pieces of code that you must include in your table:

  1. OnInsert() trigger,
  2. OnValidate() trigger for No. field,
  3. AssistEdit function.

Whithout writing New code You can paste it from Sales Header Table and modify it, or decide to write you own code. It's up to you.

Before writing Code You need to create Function AssistEdit in Table C/AL Globals with return value Boolean, which you enter in Locals parameters of function.


After function is created you need to create link to No. Series Setup table for your table and NoSeriesManagement codeunit for automatization of number series which will be explained later in this article.


After table C/AL globals are created, compile table, close it and reopen it in design view.

NOTE: Reason for compiling table is because Rec and xRec still aren't validated by compiler and table data so you need to do so in order to write and compile table later. In case you forget this you need to save your new table without Compiled option, and compile it later through object designer.

Now you can start writing your code and when you're deone with modifying your code your new table should look like this.


Now, lets through every trigger and AssistEdit function and explain what they are going to do:
  • OnInsert() trigger. Basicly here we write code which tests value in No. Field and if it's empty it calls our rcdSetup record (C/AL Global variable that links our table with table where we're choosing number series for our table nad form) and test if there is value in field „Br. serija za RC“ which is field developed for setting up number series for this project. If we have previously choosed number series we are calling codeunit NoSeriesManagement (C/AL global NoSeriesMgt) which is inserting next value from No. Series Lines table into No. Series and No. fields.
  • No. – On Validate () trigger. Here we write function which tests if value in No. field is equal as one in No. Series Lines table. If it is not, then it sets value of No.Series to blank because of insert automation which is dependent on No. Series fields.
  • AssistEdit function. This function is developed for purposes of DrillUp to form of No. Series form based on No. Series data of No. Series field of our table. Basicly it calls for NoSeriesManagement function to validate No. Series. Later, when developing forms and pages, this function will enable us to call No. series window with exact No. series value un field of No. of our form.

Step 3: Creating own numbering series


In our table we have added existing No. Series settings whtough rcdSetup C/AL Global parameter. If yuo want to create new number series setting which will be added to Purchase & Payables Setup. Ofcourse you can add number series setup to any other form.

First step is to create new table field which will be used for our purpose. Best thing is to copy and paste existing field for number series.


Now go to last row of table and paste selected column.


Rewrite Field No. to to match row order.

After modifying row of table be sure to check properties of table and TableRelation parameter which needs to be set to „No. Series“ because we used this value in our based table as value for No. Series relation.

If you decide to change this to another value than you need to update our first table with this value – only in C/AL code.


Step 4: Update C/AL code and C/AL globals in first table


After modification of table, you need to go back to our table and change Record parameter in C/AL globals and in C/AL code replace "Br. serija za RC" with „Implementing Nos.“.

Now our C/AL globals need to look like this:


And C/AL code needs to look like this:


Save the table.

Step 5: Create user interface


Last step in implementing our Number series functionality is to set user interface. This is done with OnAssistEdit() trigger on No. field. This will add new button in form field which will open form with No. seris of our setup table.

Create new card form with form wizzard or page with page wizzard.



Now enter C/AL code to trigger


When developing page change CurrForm with CurrPage and you're set.

Now let's test our form.


Enjoy..

Thursday, December 22, 2011

Deleting Rows from FA Journal Page

Working with new Dynamics NAV 2009 pages can be very frustrating, especially if you are used to using keyboard shortcuts in your work.

Other thing that, in my opinion, is nature of pages which is almost opposite of old classic NAV forms. This is what I've encountered during testing of NAV pages.
In classic NAV lists it was easy to mark rows (selecting rows (CTRL+a) and marking feature which is removed from Pages), but on pages it isn't so.
Despite easy of use and windows features, marking was more or less - the same. But I've encountered some strange issues with deleting marked rows in Fixed Asset Journals.

I've marked all of rows (with keyboard) and tried to delete them, but nothing happened.


In picture above you can see that when I selected all rows cursor came to last row and last column and positioned itself in field as if I'm going to enter data into it.

After some testing I still didn't found root of problem and fixed this issue.

I tried changing type of field and even set Edit parameter of last field to , but it didn't work.
Next I tried to mark them with mouse and then tried to delete rows and this time it worked.

Wednesday, August 3, 2011

NAV 2009 RTC MenuSuite and Action pane itmes relation

Let's talk about how smart RTC is when designing action menu items (Home items).

When designing Menu action (Home items) You want Your users to have on-eye ability to use most user NAV funcionalities. So naturally You'll add actions that represent those form (or card) NAV items.
NAV RTC has programmed logic that sounds something like this:


When designing action cues use those drop down forms as home items because it is big probability that user will use those forms often!


In short this means that all forms or cards used when developing cues those forms will automatically show in home items and you don't need to manually add them on Page actions.

Of course there is a little bit problem if you want to remove those items from home acitons. This is still RTC built in funciontality and it is depended on Microsoft's will to make this RTC modification.

NAV 2009 RTC Blank MenuSuite Items

When creating / converting menusuites from Classic client to RTC client there is one thing, besides menu structure and permissions, that You need to think about and that is multilanguage options.

RTC handles multilanguage items drastically harder than classic client. This means that you must specify menusuite item captions for every item and for evey language used. If You don't populate Caption ML those itmes won't show in RTC departmets for language that wasn't specified on seperate items.
Of course Your items will show when viewing RTC using default language.

Saturday, July 30, 2011

Date error when starting RTC report

Microsoft Dynamics NAV 2009 is in many ways depending on Microsoft Windows OS.
One of dependencies we're going to talk about is date formating.

NAV 2009 RTC has issue with interpretation of date formating and displaying reports if date format isn't set up according to RTC liking. In my experience when trying to run RTC reports with standard date formating You'll get following error::


Just for information (You probably won't get same error as I did) this error is displayed in Croatian language (from NAV 2009 R2 Croatian localization) and it means: Date isn't valid.

Solution for this problem is to set up Microsoft Windows Regional Settings and change date formating. Path to date formating set up is:


Control Panel > Regional Settings > Formats > Additional settings... > Date > Date formats.

Here you need to change two fields:
  • Short date,
  • Long date.


Yuo need to change current values to:
  • Short date: d.M.yyyy
  • Long date: dd.MMMM.YYYY
Notice that only thing that is different is full stop mark (".") at the end of date formatting.
After change (close RTC if you opened it) start NAV 2009 RTC.

Thursday, July 28, 2011

RTC Connection to SQL Server

Have you ever had problems with NAV upgrade and RTC connection?

Today we've just finished wih upgrade from NAV 4.0 SP4 to NAV 2006 R2 and had wierdes problem. After upgrade, testing classic client functionalities and RTC functionalities we decided that it's time to upload ugraded database to client server.

After setting up server, installing new clients and testing of classic functionalities we moved on to RTC testing. Of course we thought that we aren't going to experience any problems because of previous hard RTC tesing. And we were wrong.

We got our first error and eaven didn't start RTC on client side. Even we installed Demo database (Cronus International Ltd.) and showed it to he users and modified connection string to our database we  got this error:



And then we started mining for solution. This is what we tried:
  • deleting user personalization table (2000000071),
  • restarted NAV services,
  • restarted Windows server,
  • deleted and updated object medatada table (2000000071) from Cronus databas for common objects.

Last thing that we tried (and that did the trick) was deleting Object metadata table and compiling all objects from Object designer.

Thursday, July 21, 2011

NAV 2009 feature: Substitute posting groups

New feature: Substitute posting groups.

Every functionality in Sales and Marketing, that has any relevance to Posting groups, has new functionality which backs-up original posting group setting.
This functionality enables users to set up substitute posting groups thus disabling users to change posting groups as they please. Substitute Posting Groups option needs a little more effort to set-up, you'll extend NAV's security features to new level.
Standard NAV 2009 feature copies Posting groups directly from customer or vendor cards directly in form field which is dedicated to Posting group (ex. Customer Posting Group). NAV 2009 requires user to set-up rights for changing posting groups, or to enable substitute posting groups.
Setup Path: Financial Management > Receivables > Setup > Sales and Receivables Setup.

This setup form has Boolean field Allow Alter Posting Groups which enables changing of posting groups.
After enabing change of Posting Groups fill in substitute posting groups. This is done in Posting Groups SubForm

Customers Vendors
Form ID: 110 Form ID: 111
SubForm ID: 26504 SubForm ID: 26505

Path for customers: Financial management > Setup > Posting Groups > Customer > Posting Group > Substitutions.
















Path for vendors: Financial management > Setup > Posting Groups > Vendor > Posting Group > Substitutions
















Here are some pointer for consultants and implementators:
  1. When entering posting groups through NAV forms you'll get error when trying to enter same substitute posting group as upper (normal) posting group.
  2. When trying to choose posting group from Posting group flow field, and you choose same posting group you'll get error:

Tuesday, July 19, 2011

RTC vs Classic MenuSuite

In the Classic client, accessing forms and reports is done from the navigation pane, which displays menus that are contained in a MenuSuite object. In the RTC client, navigation to pages and reports is done with:
  • Role Centers
  • Departments
MenuSuite object that is useed in the Classic client can be transofmed to a Departments page that is used in the RoleTailored client.
The Departments page contains entire suite of functionality available to the company. In this way, the Departments page in the RTC is similar to the navigation pane in the Classic client. The Departments page is also a MenuSuite object with layered item structure but is designed specifically for RTC.
When creating a new MenuSuite object, you must select either the Classic client or the RoleTailored client as the target.

The ID of a MenuSuite object for the RTC will be the Classic client ID plus 1000, as shown in the following table.

MenuSuite object in the Classic client MenuSuite object in the RoleTailored client
10 MBS 1010 Dept - MBS
51 Add-on 1 1051 Dept - Add-on 1

MenuSuite object is transformed by using the Transformation Input File (TIF) Editor. The MenuSuite transformation creates a suggestion for a Departments page that is based on the navigation pane, transformation rules, and input.
After MenuSuite object transform ation, you must verify whether you need to make additional updates to the transformed Departments page. The RoleTailored client has different functionality and different user experience (UX) requirements than the navigation pane in the Classic client. The additional updates that you make to the transformed Departments page can take advantage of the new functionality.
To reduce the number of these manual updates that you have to make after transformation, verify that you meet the following conditions before transforming a MenuSuite object.

Condition Reason
PageType is assigned to all form objects. Form objects will be placed in a Department Category based on PageType.
CardFormID is assigned to all list form objects with a card. Card Form IDs in MenuSuite will be replaced with the related list.
Microsoft Dynamics NAV Developer Toolkit is installed to provide data about which reports are ProcessingOnly reports. ProcessingOnly reports are placed in the Tasks category on department pages. Other reports are placed in the Reports and Analysis category on department pages.

Wednesday, July 13, 2011

Running Transformation Tool

To run transformation tool witf TIF 1.21.700 editor and convert form to page follow there steps:
  1. Navigate to Transformation tool: Transformation > Transform forms 
  2. Start funkction: Setup > Get Forms to add forms to transformation tool.
  3. Enter ID of form you would like to transform (best view from object designer)
  4. PageType: choose Card or List or whatever option of form best suites your conversion
  5. Function > Create transformation input > Transform pages. This creates TransformPages.xml which is exported form from transformation tool.
  6. Export form from Object designer in XML form and name it Forms (forms.xml).
  7. Run Form transform tool by double clicking on Microsoft.Dynamics.Nav.Tools.FormTransformation.exe which must be located in folder entered on Setup > Transformation card setup.
  8. Open object designer and import created Pages.XML.
  9. Compile imported object in Object Designer.
  10. Edit menu (RTC menu usually named with „Dept –„) and add created page to menusuite.

Transformation Tool MenuSuite

When importing Transformation tool it creates seperate MenuSuite "TIFPM Transformation" with ID 52 and updates Company menusuite with new menu item "Transformation".

Problem with this menusuite is that users cann't see it in their normal view because menusuite created in Company menusuite has no itmes, just tree structure.

Sollution to this problem is to open two clients and copy/paste Transformation menuitems from "TIFPM Transformation" menusuite from one client to Company menusuite in other client. This copy/paste operation is done in design function of menusuite.

After copy / paste is completed you can simply delete TIFPM Transformation menusuite because all items are in Company menusuite.

Be advised to close and compile LAST one menusuite that you did paste operation.