Saturday, September 29, 2012

"The date is not valid" in Navision 2009 SP1 or R2

Today I got a request in which the client was getting "the date is not valid" error when they are trying to authorize credit card using Navision Webservice. They were using chargelogic add-on and exposed a codeunit in which it has functions to authorize credit card.


When I first saw that error my initial thought was it is something related to settings in customsettings. config file. So we changed "WebServicesDefaultTimeZone” setting to use "Server Time Zone". But unfortunately that did not fix the issue and we kept getting the same error. Then I used my debugging skills to find the part of code where the error was happening. Once I debugged it I found that they have some customizations to improve performance in which one of them was to use single instance codeunit to get data from setup tables. Instead of using normal statement table.GET statement they stored all these get statements in separate functions in a single instance codeunit and they called this codeunit whenever they wanted to use GET statement for setup tables.

Share:

Saturday, July 7, 2012

The Page contains a control add-in that is not permitted.

You may notice this error, when you develop a client add-in and add that to a page but forget to register the client add-in.



In Navision whenever you develop a client add-in you need to register that in Client Add-in” table (2000000069) with at least its name and the public key token of its signature. You can do this manually if you know the public key token and here is the msdn article to get the key for add-in.

Share:

Wednesday, July 4, 2012

An Error has occurred while logging on to the MAPI session - Navision


The other day i was helping a client to move their customizations from classic to Role Tailored Client. They had a custom email functionality which was working fine but when the function was executed in Role Tailored Client Navision 2009 R2 it did not open outlook client. When i debugged i found that error was happening at the below line of code which is in custom codeunit which was implemented by previous VAR.

IF (NOT OApplication.Logon(TRUE,'','',FALSE,FALSE)) THEN BEGIN
  OApplication.Logoff;
  EXIT
END;

 
Then i added Message Box to display OApplication.ErrorDescripton which showed the below error message.


I googled for this error but could not find much help, so i executed standard email function on customer communication and it was working. Then i compared custom function and the standard email function in codeunit 397 for new message. I found one difference, when an object is created using CREATE the custom email function was not using NewServer and OnClient parameter.

For example custom code has : CREATE(OApplication) which will work fine in classic, but to execute this on RTC we need to use NewServer and OnClient paramters.

So i have changed code from CREATE(OApplication) to CREATE(OApplication,TRUE,TRUE) and did this same for other objects. This resolved the issue.


Share:

Tuesday, June 12, 2012

Data migration error %1 is not a supported datatype


When you design a dataport and if you have used a field which is of flowfield type and when you try to import data using that dataport, you will be see the below error message.

"%1 is not a supported datatype"

To reslove this error please remove the flowfields from field designer of dataport.
Share: