Wednesday, 19 June 2013

Back in Time

After many years work in the re-seller channel I have take on a job as the CIO of a company that uses Dynamics NAV. They are using an interesting mix. NAV 4.0, but still with the 3.7 menu, on NAV 2009 exes. All heavily modified. So for me it is like stepping back in time to about 2004 which would have been the last time i really had much to do with a version 3.7 installation.
The challenge is to determine a strategy for them to continue to grow the business on.

Thursday, 19 January 2012

Uploading Large Files to RTC

Recently I have had a client attempting to load large files to NAV through RTC.

They are in the process of migrating a company to NAV and have a fairly large number of G/L Entries to load.

We had already developed a generic G/L Journal upload tool so the data had been mapped into a file that could be loaded though that.

When the routine was run we almost immediately got a ‘File is too large error’

After having a dig around I found a setting in the CustomSettings.Config file that limits the size of upload files.

The setting is

    <!--
      Limits the size of files that can be uploaded in order to avoid out of memory errors. This value is in megabytes.
  -->
    <add key="MaxUploadSize" value="5"></add>

The default is 5mb. So by extending this and restarting the service tier larger files can be loaded.

Tuesday, 5 July 2011

Dynamics CRM – NAV Connector(NAV Customisations)

Once the connector is installed you need to configure NAV to publish the web services for it.

Step 1 - Setup the connector.

This is fairly straight forward. Go to Marketing Setup and on the Synchronisation tab check the box ‘Enable Connector’ This will then prompt you to confirm that you want to setup the connector and when you OK it will build all the correct Web Service settings and Integration Page records.

When the connector is setup you will see a set of web services inside Dynamics NAV. To check them go to Administration –> IT Administration –> General Setup –> Web Services

image

In the Connector itself

Inside the connector you can see the entities that are coming from NAV by going into the Settings and then selecting the NAV Configuration Utility.

connector settings

Once you have connected to the database and selected the companies from it you which to connect with you will get a list of the published entities from it

connector entities 1

This will give you all the standard tables and fields, but often you will want to add new fields and tables that are specific to the customer

Step 2- Add Custom Fields on tables already mapped

To add a new field to a table already mapped you only need to modify the Page.

Nav Contact

Here I have added Name 2 to the Contact Page

As all the fields on a Page are exposed as the WSDL this will automatically update the list of available fields when you next refresh the Connector

Map Fields 2

Here we can see Name 2 has been added to the source fields list in the connector.

Step 3 - Add Custom Tables

Again this is fairly straight forward.

In order to get the system to automatically add the entries to the Web Services and the Integration Page tables you need to modify Coudeunit 5150. There are 3 functions you need to modify.

EnableConnector

In teh EnableConnector Function you need to add a new line for each new table. This allows the routine to determine what the correct Form and table ID’s are for your new table. If you want to force a specific form you can specify it here.

In this example I am adding the Vendor to the connector

 


EnableConnector()


IF NOT IntegrationPage.FINDFIRST THEN BEGIN


  SetupWebServicePages(FORM::"Resource List",DATABASE::Resource);


  SetupWebServicePages(FORM::"Payment Terms",DATABASE::"Payment Terms");


  SetupWebServicePages(FORM::"Shipment Methods",DATABASE::"Shipment Method");


  SetupWebServicePages(FORM::"Shipping Agents",DATABASE::"Shipping Agent");


  SetupWebServicePages(FORM::Currencies,DATABASE::Currency);


  SetupWebServicePages(FORM::"Salespeople/Purchasers",DATABASE::"Salesperson/Purchaser");


  SetupWebServicePages(FORM::"Customer Card",DATABASE::Customer);


  SetupWebServicePages(FORM::"Item Card",DATABASE::Item);


  SetupWebServicePages(FORM::"Sales Order",DATABASE::"Sales Header");


  SetupWebServicePages(FORM::"Sales Invoice",DATABASE::"Sales Header");


  SetupWebServicePages(FORM::"Posted Sales Invoice",DATABASE::"Sales Invoice Header");


  SetupWebServicePages(FORM::"Units of Measure",DATABASE::"Unit of Measure");


  SetupWebServicePages(FORM::"Ship-to Address",DATABASE::"Ship-to Address");


  SetupWebServicePages(FORM::"Contact Card",DATABASE::Contact);


  SetupWebServicePages(FORM::"Currency Exchange Rates",DATABASE::"Currency Exchange Rate");


  SetupWebServicePages(FORM::"Customer Disc. Groups",DATABASE::"Customer Discount Group");


  SetupWebServicePages(FORM::"Item Disc. Groups",DATABASE::"Item Discount Group");


  //New Table


  SetupWebServicePages(FORM::"Vendor Card",DATABASE::"Vendor");


 


  SetupIntegrationService;


END;


 


MarkDeletedIntegrationRecords;


SetupIntegrationTables;




SetupIntegrationTables



You need to add a new line for each table here





 


SetupIntegrationTables()


InitializeIntegrationRecords(DATABASE::Resource);


InitializeIntegrationRecords(DATABASE::"Payment Terms");


InitializeIntegrationRecords(DATABASE::"Shipment Method");


InitializeIntegrationRecords(DATABASE::"Shipping Agent");


InitializeIntegrationRecords(DATABASE::Currency);


InitializeIntegrationRecords(DATABASE::"Salesperson/Purchaser");


InitializeIntegrationRecords(DATABASE::Customer);


InitializeIntegrationRecords(DATABASE::Item);


InitializeIntegrationRecords(DATABASE::"Sales Header");


InitializeIntegrationRecords(DATABASE::"Sales Invoice Header");


InitializeIntegrationRecords(DATABASE::"Unit of Measure");


InitializeIntegrationRecords(DATABASE::"Ship-to Address");


InitializeIntegrationRecords(DATABASE::Contact);


InitializeIntegrationRecords(DATABASE::"Currency Exchange Rate");


InitializeIntegrationRecords(DATABASE::"Customer Discount Group");


InitializeIntegrationRecords(DATABASE::"Item Discount Group");


//New Table


InitializeIntegrationRecords(DATABASE::"Vendor");




IsIntegrationRecord



You also need to add a reference in here so the system knows that the Table is part of the integration.





 


IsIntegrationRecord(TableID : Integer) : Boolean


IF TableID IN


   [DATABASE::Resource,


    DATABASE::"Payment Terms",


    DATABASE::"Shipment Method",


    DATABASE::"Shipping Agent",


    DATABASE::Currency,


    DATABASE::"Salesperson/Purchaser",


    DATABASE::Customer,


    DATABASE::Item,


    DATABASE::"Sales Header",


    DATABASE::"Sales Invoice Header",


    DATABASE::"Unit of Measure",


    DATABASE::"Ship-to Address",


    DATABASE::Contact,


    DATABASE::"Currency Exchange Rate",


    DATABASE::"Customer Discount Group",


    DATABASE::"Item Discount Group"


    //New Table


    //DATABASE::"Item Discount Group"]


    DATABASE::"Item Discount Group",


    DATABASE::"Vendor"]


 


THEN


  EXIT(TRUE);


 


EXIT(FALSE);




Once this is done you can refresh the integration by Un-checking the  Enable Connector box in Marketing Setup and then rechecking it again. This will refresh the settings. NAV webservices



When you next refresh the connector you will find the new entity



connector entities 2 

















Now the Vendor Card appears in the list of entities and just needs to be enables to be used in a map.

Dynamics CRM – NAV Connector

With the release of NAV2009R2 Microsoft came the release of the Dynamics Connector for NAV and CRM.

The connector itself has been around for a while and was in use with Dynamics GP and CRM. Since it came out with NAV I have had a play with it and I have a couple of sites that are at various stages in implementing it.

Personally I think linking Dynamics NAV with Dynamics CRM gives a very powerful solution. The users access by the method that makes most sense, fairly often we see uses needing to deal with customers or vendors and track interactions but with a limited impact on the ERP. They maybe raising orders or making basic enquires but they don’t need all the functions that the ERP provides.

Often sales wants to be out and about working in an offline capacity. The offline integration with Outlook in CRM makes this possible, plus it presents a familiar interface.

The connector provides out of the box integration for these sorts of things.

NAV-CRM Mapping

The connector itself acts as a mapping tool and uses web services on both sides to handle the integration.

NAV-CRM Overview

While working with it I have found the amount of information on how to add customer fields and tables to the connector to be limited

In the next 3 posts I’ll look at how to setup and customise the connector.

The first will look at Dynamics NAV
The second Dynamics CRM
and finally the third will look in more detail at the connector itself

Monday, 9 March 2009

Windows 7 Gadgets and Disabled UAC

For some reason Windows Gadgets don’t run in Windows 7 if you disable the UAC. Now I like windows gadgets and I am trailing Windows 7 but some of the software I was using was having a hard time with UAC so we turned it off and all of a sudden all my gadgets disappeared. after a bit of searching around I found the solution of the Windows 7 News blog.

<Quote>
The Windows 7 Sidebar and Gadgets do not work correctly if a user disables the User Account Control in Windows 7. There is however an easy way to make the gadgets and sidebar work again without having to replace system files (that was the way suggested in many forums).

All that needs to be done is to change one value of a parameter in the Windows 7 Registry to make the sidebar and gadgets work even with UAC disabled.

Open the Windows 7 Registry by pressing [Windows R], typing [regedit] and hitting [enter]. Now navigate to the Registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Setting and change the value of AllowElevatedProcess to 1.

Restart the computer or logout and login again to see if the changes work as intended. The Registry setting ensures that the gadgets and the sidebar are working in Windows 7 properly even if UAC is disabled.
</Quote>


On my machine that registry value was missing so I added a new DWORD to the setting. Logged out and back in and all my gadgets reappeared. Life is good again :)

Friday, 13 February 2009

NAV Web Services

So we have been doing some integration work between a custom piece of development and NAV2009. Our NAV Dev setup some code and exposed it as a series of web services. To test them a simple console app was written and everything was good.
Then they tried running the console app on a different machine to the NAV web service, all of a sudden nothing worked.
We went back over the config settings of the console app and confirmed that it was pointing to the correct URL for the web service, which it was, but for some reason when we ran it it kept trying to look for the service on the localhost. This turned out to be a setting in Visual Studio that by default embeds the URL of the web service when you register it, who knew..... well one of our .NET devs did thankfully. So by changing the GenerateDefaultValueInCode to False your solution will look to the Config file instead.














So after changing that and rebuilding the app we tried again. Still not working. After much testing with little joy we tried some simple tests on a different set of machines, on these we managed to get the following




Turned out that Windows firewall was blocking the port we were using, so after adding an exception to the firewall everything worked fine.
So next time we do some of this stuff we are going to make sure the server has the port unblocked and that we remember to tell Visual Studio not to imbed the web service URL (its default action) so we can control it with a config file.

Thursday, 8 January 2009

Another Year Over

It's been an exciting one for me.

First up Dynamics CRM4.0 was released at the start of the year. We have done a number of installation of it now and the team have done some very interesting things with it.

Next Dynamics NAV5 SP1 was released, while not a major release it did bring some interesting things. Firstly it got rid of the highly confusing SIFT tables and replaced them with views. It also brought access to the Dynamics Mobile client.

Then December brought us Dynamics NAV 2009. This is a major release and brings us lots of fun stuff. The most obvious is the new Role Tailored Client(RTC). It also gives NAV web services out of the box, something we have been after for a long time. It supports SQL2008, also released this year. We have already started working with this latest version and have a number of upgrades and new installations lined up for the first part of next year.

Closer to home the Intergen Dynamics team had some significant growth with around a dozen new team members joining over the year.
Dave Roys in Christchurch was awarded Most Valued Person by Microsoft, this is a great honour as there are only a dozen or so MVP's for NAV worldwide and Dave is the only one in Asia Pacific.
Craig Keenan was made a Subject Matter Expert for NAV.
Intergen was involved in the Dynamics NAV Partner Advisory Board and with 7 attendees out of a total of 11 coming from Intergen I think it shows how involved in the future of NAV we intend to be.

Away from the Dynamics products. Windows 2008 and SQL 2008 were both released.
Intergen has been doing huge amounts of work with MOSS as well as its more traditional custom builds. We have also been looking at all the new stuff Microsoft announced at the PDC around Cloud Services, Windows 7 etc.

2009 should be a very interesting year, between all the new things that are coming and the current global economic situation there will be many challenges ahead. More and more I think companies will be looking at ways to work smarter and reduce their overheads. Hopefully that will mean that people like me will still be in demand.