Wednesday, August 20, 2014

The difficulties of synchronous integrations with Dynamics GP

By Steve Endow

Let's say that you have a custom "operational" system that runs much of your business.  Let's say it's a transactional system that is specific to your industry--suppose it's an Auto Insurance Policy management system.

So this system manages all of the crazy rules and regulations and requirements for quoting and issuing and managing auto insurance in multiple states, and it also issues invoices.  You have hundreds of insurance agents that sell your insurance in multiple states, so the agents are your customers, and you may invoice them for hundreds or thousands of customer policies per month.

When you issue invoices from the auto insurance system, you want the invoices automatically created in Dynamics GP.  So after you prepare the invoices for the agent in Atlanta, you want to be able to click a button in your operational system that sends all of his invoices to GP.

Your operational system was developed using a non-Microsoft development platform, so you can't directly invoke eConnect, and it can't communicate via web services.  But it can call a COM component.  So great, you create a COM visible .NET assembly that reads data from a database and imports transactions into Dynamics GP via eConnect.  Works great, and you are happy!  You click a button and an invoice magically appears in GP, instantly!  Yay!

This sounds good, except when you use it with real data.  What if that agent in Atlanta has 2,000 invoices?  The import into Dynamics GP will certainly take more than 30 seconds, and could take a few minutes.  So if you click on that magic button, your operational system may hang for several minutes as it waits for a response from the COM component.  Not a good experience for users.

And what if there is an error with 10 invoices and they fail to import into Dynamics GP?  Now you have 1,990 invoices in GP, but you are missing 10.  How do you handle that?  Do you then route the user to some additional window where they can review and potentially correct the issues?  Do you add some additional code to re-import the 10 that failed?  What if the error is due to a missing GL account or Class ID or Item in GP that will take some time to setup?  Is your operational system really the place for users to deal with the integration issues directly?

What if GP is offline or there is an issue that prevents the import from running?  You then get an error when you click on the magic button.

In short, it can get messy.

This scenario is what I call a "synchronous" system integration--sometimes people call it a "real time" integration.  The operational system is attempting to 'directly' import data into Dynamics GP and is waiting for the import to finish so that it can receive a response.  For some simple situations, this might work well--say creating customers or vendors or inventory items.  But for transaction imports, and especially high volume imports, it can become problematic.

I therefore recommend "asynchronous" system integrations.  Usually, this involves some type of data repository that acts as a queue.  The operational system might export a CSV file every hour, or perhaps a CSV file for each batch of invoices, or a file for each customer that needs to be invoiced.  The operational system could also write records to a staging table in SQL Server.

A separate process is then run to import the operational data into Dynamics GP.  It can be scheduled using Task Scheduler, or can be triggered via command line, or it could be user initiated through an EXE or GP AddIn.

This approach decouples the two systems and allows them to operate completely independently, with the integration being a discrete system and process that allows the operational system to interface with Dynamics GP.

One downside to asynchronous integrations is that they aren't "real time".  If you schedule the integration to run every 5 minutes, there is a 5 minute delay between the invoices being created in the operational system and them being imported into GP.  In my experience, there are very few customers that need integrations to run more frequently than every few minutes. (A common exception is with inventory--some customers need receipts and transfers processed immediately to complete a subsequent transaction with that inventory)  And even if you think you need something imported into GP every 30 seconds, don't forget that you have to post transaction batches in GP--so that has to be done manually or using a batch posting tool like Post Master Enterprise, another process which takes some time depending on the batch size.  So "real time" is a misnomer at best.

Yes, you still have to deal with errors and reprocessing failed transactions with asynchronous integrations, but they no longer hold up your operational system, and you have to deal with those errors in either case.

I recently when down this path with a customer, but they had to experience it themselves to understand the complications and caveats of the synchronous approach.  I am now providing a new version of the integration that will allow them to trigger the GP import, which will run asynchronously.


Steve Endow is a Microsoft MVP for Dynamics GP and a Dynamics GP Certified IT Professional in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter



Leveraging Extended Pricing For Multiple "Percent Of" Methods

For me, extended pricing is normally brought in to the conversation when there is a need for date specific/promotion based pricing.  However, I had a co-worker ask about a scenario recently that made me consider extended pricing in a new way.

In the scenario, the client needed the following price structure:
  • Flat Retail Price
  • Flat Wholesale Price
  • Discounts based on Wholesale Price (% Off)
They did not want to maintain all three of these items as flat amounts (which would be needed if using standard Dynamics GP pricing, since you can only have on price "method" per item price list).

So, to accomplish this in Extended Pricing, here is what we did...
  • Establish the Base Price Book to contain the Wholesale Prices of items
    • The Price Type in this case would be Net Price since it is a fixed dollar amount
    • This will allow it to be treated as the List Price of the item
  • Establish a Wholesale Price Sheet
    • The Price Type in this case would be Percent of List as 100%, and it would be set to Base Adjusted Price on- Base Price Book
    • This may seem redundant, but I thought it would make for better visibility in terms of what is assigned to customers and items in terms of pricing
  • Establish a Retail Price Sheet
    • The Price Type in this case would be Net Price, with the fixed dollar amount
  • Establish a Discount Price Sheet(s)
    • The Price Type in this case would be Percent of List, with Base Adjusted Price On Base Price Book
In this case, the client could update the Base Price Book and automatically update any number of discount price sheets automatically. 

Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a senior managing consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.



Thursday, August 14, 2014

Checking the number of SQL Server connections for SQL connection "Timeout period elapsed" error

By Steve Endow

 I recently had to troubleshoot an issue with a Dynamics GP third party product that would hang with the error:
Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.



Please note the phrase "prior to obtaining a connection from the pool".  This is not a command timeout, it is a connection timeout due to a lack of available connections in the application's connection pool.

To confirm this problem, I ran the following SQL query that I found on some helpful forum post (don't recall where):

SELECT
    DB_NAME(dbid) as DBName,
    COUNT(dbid) as NumberOfConnections,
    loginame as LoginName
FROM
    sys.sysprocesses
WHERE
    dbid > 0
GROUP BY
    dbid, loginame

This query produces a very nice result set that allows you to quickly and easily see active SQL connections.

In my case, the third party application was opening 100 connections to its database, so if you tried to process more than 100 records, it would hang and display the connection timeout error above.

This problem occurred because the application was not properly closing its connection as it looped through hundreds of records.

The query helped me quickly confirm the issue and point the developers to the source of the error.


UPDATE: Please check out David Musgrave's related post about how this problem can occur with VBA modifications in Dynamics GP:

http://blogs.msdn.com/b/developingfordynamicsgp/archive/2014/04/23/more-on-sql-server-connection-issues-with-microsoft-dynamics-gp.aspx



Steve Endow is a Microsoft MVP for Dynamics GP and a Dynamics GP Certified IT Professional in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter





Wednesday, August 13, 2014

Microsoft eliminates exams and certifications for Dynamics GP, NAV, SL, and RMS

By Steve Endow

Two weeks ago I was coordinating with a Dynamics GP partner to update my Dynamics GP certifications in conjunction with them renewing their MPN certification requirements.

But when one of the consultants tried to schedule an exam on the Prometric web site, the web site would not let her complete the registration process, saying that only vouchers could be used to pay for the Dynamics GP exam.

At the same time, we found some discrepancies on the Microsoft web site regarding the Dynamics GP certification requirements and MPN certification requirements, so the partner inquired with Microsoft.  We were told that some changes were being made to the certification requirements, and that the updates would be communicated shortly.

Today we received an official announcement that Microsoft is eliminating the exams and certifications for most, but not all, of the Dynamics products.
We are announcing the elimination of certification/exam requirements for Microsoft Dynamics GP, Microsoft Dynamics NAV, Microsoft Dynamics SL, Microsoft Dynamics RMS and Microsoft Dynamics C5 effective August 13th. This includes pre-sales and sales assessments as well as implementation methodology and technical certifications covering both SPA and MPN.
Microsoft Dynamics AX and Microsoft Dynamics CRM are not impacted by this announcement.  Assessment and certification requirements remain for these product lines. 
A brief version of the announcement is posted on this Partnersource page:

https://mbs.microsoft.com/partnersource/northamerica/readiness-training/readiness-training-news/MSDexamreqchanges


I have mixed feelings about this change.  A few years ago, Microsoft made such a big push for requiring Dynamics GP certification, and requiring all partners to have several certified consultants on staff.  That produced dramatic changes in the partner channel that affected a lot of people.  Eventually things settled down and the exams and certifications became routine.

This announcement appears to be a 180 degree shift from that prior strategy, and completely abandons exams and certifications.  While this may open the market back up to smaller partners, I now wonder if consulting quality may decrease as a result.  But this assumes that the exams and certifications mattered and actually improved consulting quality--I don't know how we could measure or assess that.

So, welcome to a new phase in the Microsoft Dynamics strategy.

What do you think?  Is this a good thing?  A bad thing?  Neither?

Steve Endow is a Microsoft MVP for Dynamics GP and a Dynamics GP Certified IT Professional in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter





Back to Basics- ODBC connections and third party products

We had an oddity a couple of months ago with a relatively well known third party product.  Here were the symptoms...

  1. User could run a billing generation process when logged in on the server
  2. User could not run process when logged in to their local install
  3. SA could not run process when logged in to their local install
  4. Set up new user, still could not run process
  5. Happened from multiple workstations
  6. Spent hours and hours on phone with third party product, as it was perceived to be a code issue
It seemed like we were just going to have reinstall the workstation.  But even that didn't make a lot of sense because we had tried copying over dictionaries, and reinstalling the third party product to no avail.  So, duh, what could it be?  The ODBC connection.  We did not do the installation of the workstations, and it appeared that the ODBC was most likely set up manually and there were settings marked that are not recommended.  Once we corrected the ODBC connection, all was good and right with the world.  So another reminder that the weirdest issues normally have the simplest explanations.

Here's a blog post on how to set up an ODBC connection properly for GP (or let the installation automatically create the ODBC connection to avoid issues):
https://community.dynamics.com/gp/b/azurecurve/archive/2012/09/25/how-to-create-an-odbc-for-microsoft-dynamics-gp-2010.aspx

Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a senior managing consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.

Management Reporter- Columns Not Shading Properly

Sometimes the devil is in the details.  Honestly, it seems like ALWAYS the devil is in the details.  There are quite a few community and blog posts floating around regarding column shading in Management Reporter.  So I thought I would summarize my recent experience with this, as it is/was a little trickier than expected.

First, yes, it is really is as easy as highlight the column in the column format and applying shading.

 
After you do that, yes, it looks funny (meaning the whole column does not appear shaded).  But that is okay, and NORMAL.

 
Now, here is where it gets tricky.  If you have applied ANY formatting to your row (including indenting, highlighting, font change, etc), then the shading will not take effect.  This is identified as a quality report with Microsoft, #352181. And unfortunately, there is no scheduled fix date yet.  So the only workaround is to recreate the row format without the additional formatting.
 
Results when indenting is applied on the row format...note the rows that are indented are not shaded properly.
 
 
Row format with indenting...
 
 
 
So it seems, for now, you have to choose between formatting (and I mean ANY formatting, not just shading) on the row format -vs- shading on the column format based on your needs.
 
Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a senior managing consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.

 
 


Management Reporter- Date Not Printing Correctly

You may have noticed that the default, in recent versions of Management Reporter, is for reports to open in the web viewer rather than the Report Viewer itself.  Of course, you can change this setting (so that it defaults to the Report Viewer instead) in Report Designer, using Tools>>Options.

You may have noticed though, that the auto text for date (@DateLong) on a header or footer, returns a different result when opening the report in the web viewer or Report Viewer.


When opening a report in the web viewer, the date/time settings (that impact the format of the date presentation) will be pulled from the service account that runs the Management Reporter Process service.  But when you generate a report and it opens in the Report Viewer, it will use your local user account's date/time settings.

So, if you plan to use the web viewer extensively you will want to make sure that the date/time settings are set in the profile of the account that runs the process service.  The default time format, generally includes the day of the week- this is often the element that users want to remove so that the report does not say "Tuesday March 12th, 2019".

Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a senior managing consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.