Microsoft Product Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 9 January 2011

IM - Retrieving document numbers assigned by Microsoft Dynamics GP when field rule is set to Use Default in Integration Manager - Part 2

Posted on 17:56 by Unknown
Part 2 of 2 - Retrieving document numbers assigned by Microsoft Dynamics GP when field rule is set to Use Default in Integration Manager.




In the previous installment, I explained the technique that I otherwise use to relate source systems records with imported records in Microsoft Dynamics GP for which a Use Default field rule has been set for the key field. This article demonstrates the key event scripts needed to obtain the record.

Before Integration event script
'
' Created by Mariano Gomez, MVP
' This code is licensed under the Creative Commons
' Attribution-NonCommercial-ShareAlike 2.5 Generic license.

' Secure a connection against the company database we will be running
' the integration against.

Const adUseClient = 3

set oCn = CreateObject("ADODB.Connection")
oCn.ConnectionString = "database=" & GPConnection.GPConnIntercompanyID
oCn.CursorLocation = adUseClient
GPConnection.Open(oCn)

' Make sure the connection is valid
If (oCn.Status = 1) Then
' Setup global connection variables
SetVariable "gblConn", oCn
SetVariable "gblInterID", GPConnection.GPConnIntercompanyID
Else
CancelIntegration
End If

The Before Integration event script will allow us to secure a connection against the company database we will be running our integration against. By opening the connection in this event script, we will avoid having to open a connection for each transaction being integrated, further on, creating any loss of performance in the process. It is important to highlight that we need to save the successful connection to a global variable, to be able to use it in other event scripts. In this case, we will assign the oCn connection variable to a global variable, gblConn, using the SetVariable statement.

Once Integration Manager has integrated the document, we will use the After Document event script to retrieve the record integrated. At this stage, we are assuming that the mapping of source fields to destination fields provisions a user-defined field or description field for the source key field. In the past, I have also used note fields to store these key fields when it has not been feasible to use a standard Microsoft Dynamics GP field.

Note: the After Document event script will only execute upon success of the document being integrated. If Integration Manager is unsuccessful integrating the document, the Document Error script will execute instead. This event can be used to report failure to the source system, which may facilitate new attempts to integrate from the source system by reporting different event statuses.

After Document event script
'
' Created by Mariano Gomez, MVP
' This code is licensed under the Creative Commons
' Attribution-NonCommercial-ShareAlike 2.5 Generic license.

' Prepare the SQL statement and retrieve the assigned Sales Transaction number
Set oCmd = CreateObject("ADODB.Command")
With oCmd
.ActiveConnection = GetVariable("gblConn")
.CommandType = adCmdText

.CommandText = "SELECT SOPNUMBE FROM SOP10106 WHERE USERDEF05 = '" & SourceFields("mySourceQry.KeyField") & "'"
Set oRst = .Execute

If Not oRst.EOF Then
SopNumber = oRst!SOPNUMBE
End If
oRst.Close
End With

' From here on you can open a connection to your source system and update the
' some status flag and the column provisioned to track the GP document number

I hope you find this technique useful. Of course, this is a technique I have been using over the years. I would like to find out from you what methods you have used to accomplish the same.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Integration, Integration Manager, VBScript | No comments

Thursday, 6 January 2011

IM - Retrieving document numbers assigned by Microsoft Dynamics GP when field rule is set to Use Default in Integration Manager - Part 1

Posted on 19:00 by Unknown
Part 1 of 2 - Retrieving document numbers assigned by Microsoft Dynamics GP when field rule is set to Use Default in Integration Manager.


One of the things often frustrating for Integration Manager users and developers alike is knowing what document number will be assigned by GP to an integrating transaction when the document number property in the mapping is set to Use Default. Typically, the developer will need this key piece of data, because the integration will perform some write back to a source system to mark a specific record as processed, but also passing back the document number that was assigned in GP.


The UseDefault rule is shown for a Sales Transaction mapping
But, how to know the journal number, or the order number, invoice number, or voucher number that GP has assigned to a submitted document after the record has been integrated?

Let's start by saying that I have seen techniques that read the next document number from the Microsoft Dynamics GP setup tables, then assign that document number to the key field in Integration Manager for the record being integrated. The problem with this approach is that it can cause the system to lock up and crash if users are processing transactions too. Why? Because most developers do not use transactional methods to retrieve and update the next sequence number in the Microsoft Dynamics GP tables. Imagine updating the next SOP number while a user is creating a SOP transaction at the same time. Without proper transactional methods in place, this can wreak havoc in the system.

I have also seen techniques that immediately query the transaction tables looking for the highest DEX_ROW_ID and the transaction associated with it. This technique is also not reliable, especially if they are users processing transactions at the same time the integration is being executed. In summary, you can end up retrieving the wrong document number for your source integrating transaction.

So what's the solution?

Over the years I have developed a technique to overcome this hurdle. The technique assumes that the source transaction records have a unique identifiable key (and in fact, they should). In the case of journals, orders, or invoices, this key is assigned by some source system where the transactions are being integrated from. You can easily spot this key as it typically allows header records to be linked to the detail records to create the relationships between these. For example, if you are integrating orders from your source system into invoices in Microsoft Dynamics GP, it is assumed that the Order Number from your source system is the key.

The idea is to pass this source key to a Microsoft Dynamics GP user defined field (via mapping) or other data field where it can easily be queried after the document has been integrated.

Tomorrow, I will describe the scripting elements that make it possible to retrieve a document number assigned by GP once a source document is integrated and the field rule for the key field is set to Use Default.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Integration, Integration Manager | No comments

Wednesday, 5 January 2011

Look what Santa brought for me!

Posted on 04:00 by Unknown
There is a little box for me...


The elves at Amazon brought me a book!


Gotta love this one!


Great material for the winter!!


I know Christmas is gone and whether you believe in Santa or not, that's a whole other story, but just before I left for vacation to New York City, I had ordered myself -- yes, I am my own Santa! -- a nice little reading material for the cold Atlanta winter. I figured, since summer was well spent with my Cookbooks, winter should be just as productive, especially the days I really don't feel like leaving my house. So, what did the elves at Amazon brought for me? Nothing more, nothing less than MVP Victoria Yudin's brand new Microsoft Dynamics GP 2010 Implementation book.

Now do me a favor... be your own Santa and go and order Victoria's book.

Be this the time to also congratulate Victoria on her 7th year as a Microsoft Dynamics GP MVP... the woman is rolling!
Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Books, MVPs | No comments

Tuesday, 4 January 2011

IM - Troubleshooting RPC errors when running Integration Manager

Posted on 21:01 by Unknown
Lately, I have seen a number of forum discussions where users have reported receiving a number of RPC (Remote Procedure Call) errors when running Integration Manager and thought I would offer a number of troubleshooting tips for this issue. But first, here are some of the common error messages you may see:

"The destination could not be initialized due to the folowing problem:  The RPC server is unavailable."

or

"DOC 1 ERROR: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) - The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))"


To begin troubleshooting this issue try the following options:

1. Close all running instances of Microsoft Dynamics GP and open Windows Task Manager. Under the Processes tab, verify that there is not more than one instance of the Dynamics.exe process running.


Windows Task Manager
If you find an additional Dynamics.exe process running, select it and click the End Process button. At this point, restart Microsoft Dynamics GP and try running your Integration. This solution is also outlined in KB article 943948.

2. If you are on Terminal Server or Citrix, make sure you don't have more than one active session at a time. Since you probably will not have access to Terminal Server Administration or Citrix Console, you will need to address this with your Systems Administrator. In any case, if you find more than one active session, decide with your administrator the best procedure to close down the unwated session.

You will  typically experience this error message because you have not been following the correct procedures to close down your Terminal Server or Citrix session.

3. If on Terminal Server or Citrix, you may receive this error if running Integration Manager as a published application. You will receive RPC errors if you attempt to integrate a document to Microsoft Dynamics GP when both Integration Manager and Microsoft Dynamics GP are ran as published applications.

In this case, you will want to log on to the Terminal Server console or Citrix console and execute your integration. Since this may not be acceptable to your System Administrator, as an alternative you can setup a dedicated Microsoft Dynamics GP and Integration Manager client.

4. Repair or reinstall Integration Manager and make sure to be using the latest service pack. Yes, when all else fails, some times this is the only recourse left. To download the latest Integration Manager service packs, use the following links:

Service Packs and Hotfixes for Integration Manager for Microsoft Dynamics GP 2010
(PartnerSource/CustomerSource access required)

Service Packs and Hotfixes for Integration Manager for Microsoft Dynamics GP 10.0
(PartnerSource/CustomerSource access required)

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Integration Manager, Troubleshooting | No comments

Monday, 3 January 2011

Start the year with new ways to access The Dynamics GP Blogster... from your SmartPhone!

Posted on 07:00 by Unknown
Don't want to type the site's URL anymore on your phone? Now you have choice to point your phone's camera and/or barcode reader at the QR code on the right of the navigation bar and get the site loaded before you depart your home or your office. Watch how your browser loads up the website!


http://dynamicsgpblogster.blogspot.com/


The following are QR codes to The Dynamics GP Blogster's Twitter and Facebook social networking sites:

http://twitter.com/dgpblogster

http://www.facebook.com/pages/The-Dynamics-GP-Blogster/233314529438

Now you have no excuses to not take this site along with you and read up on the latest posts while you are stock in traffic this year, again!

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Article | No comments

Happy New Year!

Posted on 04:00 by Unknown
So last year -- yes, last year! Get used to saying it! -- I told you that a popular New Year's eve tradition is to set forth a bunch of resolutions for the incoming year. The number one goal I had set for last year was to increase readership to this site and all other outlets where you can find The Dynamics GP Blogster. Thanks to all of you, the site readership and visits increased 2.5-fold. This is a snapshot of traffic taken on December 22, a week before 2010 was over:


*Click to enlarge

So now that I have your attention, what do I want for this year? Nothing more than your commitment to continue visiting this site and spreading the word. Now you have many ways to reach me: Facebook, Twitter, LinkedIn and even the Community 2.0 website - all links on the right frame. You also have one more tool: my QR code (more on this later). The more I know what you read and like, the better content I can produce (focused topics, workshops, series, technical articles, conference materials, etc). So I ask you, please don't keep this site a secret, just put in a word for this site, become a fan on Facebook, post your comments.

I know you follow me, I know you like what you read on this site (and sometimes not), I know you stay tuned, but think of the benefits others in your professional community could receive from the same information you get here. So, the next time you speak to your peers, colleagues, clients, partners just mention this site. It takes two seconds and it goes one step more to maintain my Internet presence.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Article, Season Greetings | No comments

Wednesday, 29 December 2010

The Dynamics GP Blogster's best articles of 2010

Posted on 04:00 by Unknown
Wow! 2010 is on its way out and this mark the second year I have the opportunity to publish a list of the best articles I wrote this year. The Best of 2009 was a hit, so let's give this year's a chance:

1. Using Business Alerts with Extender Tables (Jan 12) - This one came straight out of the newsgroups with Microsoft's Dawn Langlie providing a neat solution.

2. Autogenerating Customer IDs (Feb 28). Many of you seemed to have found this one very useful for whaterver projects you were working on. Up to today I still receive offline notes of thank you! for this script.

3. Microsoft Dynamics GP Architectural Foundations featuring Tim Brookins (Mar series). Many of you who had been in the channel for a while, enjoyed reading this forgotten and hard to find whitepaper, which is still today one of the best produced on the topic, even though the Dynamics GP architecture has evolved over the years. Unfortunately, Tim Brookins was not available for the closing remarks on the series.

4. Microsoft Dynamics Convergence 2010 (Apr series). For those of you who could not go to Convergence, I made an interesting series of articles with tons of pictures of the event and tapped out with the closing materials for the sessions presented by David Musgrave and I. Better yet, we will be present at Convergence 2011 Atlanta!

5. Urban Legends - "I cracked Dynamics GP encryption algorithm!" (May 21). This article was created in response to a widely circulated article claiming at the time week password encryption in Microsoft Dynamics GP. Followed were a slur of articles and official response from MS calming the fears raised among customers. In all fairness that post was later updated and corrected by the author.

6. Dexterity and Intellisense. (Jun 23) In an attempt to get a response from the community and MS, I launched a campain and created a product suggestion to implement this feature in the Dexterity. Low and behold, my friend Tim Gordon developed DexSense to fill the void.

7. Enforcing Password Policy with Microsoft Dynamics GP (Jul 15). In this article featured a SQL script that many of you who administer Microsoft Dynamics GP have found useful, as it allows you to track what GP user passwords will expire.

8. Using SQL CLR stored procedures to integrate Microsoft Dynamics GP and Microsoft CRM (Aug series). In this article, I featured a technique to integrate Microsoft Dynamics GP with Microsoft Dynamics CRM using SQL CLR stored procedures. All I can say is, the client cannot be any happier!

9. Microsoft Dynamics GP 2010 Word Templates summary (Sep and Oct series). Working on a series of Word Template topics, I had a chance to exchange ideas with the none other than Microsoft's Rob Wagner, a.k.a. the Word Templates god. This wrap up containes links to all the articles published in the series.

10. How to change your Microsoft Dynamics GP 2010 Map Services (Nov 12). As the Third Law of Newton's physics suggests, this article was created in response to a bug in the map button available next to all address ID fields in Microsoft Dynamics GP. Since I published this article, I have had requests to create interfaces to some truly obscure map services. The answer remains the same... let me think about it!

11. Do I have to use those "Z-" currency IDs in GP?. Not even 2 weeks into publishing this article and I have had a number of comments and emails flowing into my inbox with a common theme: really? I did not know that! Well, now you know.

I hope you enjoyed the selection and if you think I missed something just chime in with some of your best articles.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Article, Best of Series | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • The Dynamics GP Blogster's best articles of 2012
    It's that time of the year again! Time to say goodbye to the outgoing year, 2012, and receive the new one, 2013, making all sort of reso...
  • Running Fixed Assets Depreciation causes Microsoft Dynamics GP to "hang"
    I just completed a full upgrade of Microsoft Dynamics GP from version 9 to version 2010 R2 for a client and they were going through their fi...
  • Resetting GP desktop position and size with the Support Debugging Tool
    Just recently I worked on an issue being experienced by several Microsoft Dynamics GP users in a Citrix environment. The users would report ...
  • Microsoft Dynamics Convergence Atlanta 2011: Day 3
    Day 3: April 12, 2011 Today started with David and I meeting in the Speaker Room catching up on the previous days activities. Of course, if ...
  • Microsoft SQL Server performance boosting settings for Microsoft Dynamics GP - Part 1
    Part 1 of 2 - Microsoft SQL Server performance boosting settings for Microsoft Dynamics GP. Disclaimer: this is not a "one-size-fits-al...
  • Vote for your 2012 GPUG All Star
    The time has come again to vote for the next year's GPUG All Star awards. Surprisingly, I have been nominated to this award along with f...
  • Running Windows 8.x Business Analyzer app on a laptop with SQL Reporting Services
    If you are a consultant, chances are you run your Microsoft Dynamics GP application demo environment on a laptop along with Microsoft SQL Se...
  • "Unable to access SnapIn config data Store" accessing Web Management Console
    For quite some time I had been running into this error when attempting to access the Microsoft Dynamics GP 2013 Web Management Console appl...
  • Microsoft Dynamics GP Architectural Foundations Series - Built to Fit
    This is article 5 of 7 from the series Microsoft Dynamics GP Architectural Foundations Series - featuring Microsoft's Tim Brookins . Tim...
  • Microsoft Dynamics Convergence 2011 sessions are now out!
    If you are attending Microsoft Dynamics Convergence this year, it's a good time to begin planning the sessions you want to attend. The ...

Categories

  • Ad Campaigns
  • ADO
  • Adobe Acrobat
  • Analytical Accounting
  • Architecture
  • Around the Blogosphere
  • Article
  • Azure
  • Bank Reconciliation
  • Best of 2009
  • Best of Series
  • Best Practices
  • Bing Maps Enterprise
  • Books
  • Business Alerts
  • Business Analyzer
  • C#
  • Code
  • COM
  • Community
  • Compliance
  • Connect
  • Continuum
  • Convergence
  • Corporate Performance Management
  • CRM
  • Database Maintenance Utility
  • Decisions Conference
  • DEX.INI
  • DEXSQL
  • Dexterity
  • Discussions
  • Drill-Down Builder
  • Dynamics GP 10
  • Dynamics GP 11
  • Dynamics GP 12
  • Dynamics GP 2010
  • Dynamics GP 2010 R2
  • Dynamics GP 2013
  • eConnect
  • EFT
  • Electronic Banking
  • Encumbrance
  • Events
  • Extender
  • Field Services
  • Fixed Assets
  • Forecaster
  • From the Newsgroups
  • FRx
  • Functionality
  • General Ledger
  • GPUG
  • Home Page
  • Human Resources
  • Humor
  • IMHO
  • Installation
  • Integration
  • Integration Manager
  • Internet Explorer
  • Inventory
  • Kinnect
  • Maintenance
  • Management Reporter
  • Manufacturing
  • Menus for Visual Studio Tools
  • Microsoft Office
  • Modifier
  • Multicurrency Management
  • Multitenancy
  • MVP Summit
  • MVPs
  • Named Printers
  • Navigation Pane
  • Notes
  • ODBC
  • Office Web Components
  • OLE Container
  • Online Services
  • OpenXML
  • Partner Connections
  • Payables Management
  • Payroll
  • Performance
  • PO Commitments
  • Printer Compatibility
  • Product Feedback
  • Project Accounting
  • Purchasing
  • Receivables Management
  • RemoteApp
  • Report Writer
  • Reporting
  • Roadmap
  • SafePay
  • Sales Order Processing
  • Season Greetings
  • Security
  • Service Call Management
  • SharePoint
  • SmartList and SmartList Builder
  • SQL Reporting Services
  • SQL Scripting
  • SQL Server
  • Support Debugging Tool
  • Tax Updates
  • Technical Conference
  • The Partner Event
  • The Technology Corner
  • Training
  • Translation
  • Troubleshooting
  • Upgrades
  • VAT
  • VB.NET
  • VBA
  • VBScript
  • Visual Studio 2008
  • Visual Studio Tools
  • Web Client
  • Web Services
  • Windows 7
  • Windows 8
  • Word Templates
  • XBox
  • XBRL

Blog Archive

  • ▼  2013 (68)
    • ▼  December (2)
      • Visual Studio Tools for Microsoft Dynamics GP 2013...
      • Web Client Wednesday: Microsoft Dynamics GP on Azure
    • ►  November (8)
    • ►  October (5)
    • ►  September (5)
    • ►  August (3)
    • ►  July (8)
    • ►  June (5)
    • ►  May (5)
    • ►  April (2)
    • ►  March (11)
    • ►  February (6)
    • ►  January (8)
  • ►  2012 (101)
    • ►  December (8)
    • ►  November (6)
    • ►  October (15)
    • ►  September (16)
    • ►  August (9)
    • ►  July (4)
    • ►  June (4)
    • ►  May (6)
    • ►  April (4)
    • ►  March (11)
    • ►  February (4)
    • ►  January (14)
  • ►  2011 (158)
    • ►  December (7)
    • ►  November (17)
    • ►  October (7)
    • ►  September (8)
    • ►  August (8)
    • ►  July (12)
    • ►  June (12)
    • ►  May (13)
    • ►  April (23)
    • ►  March (21)
    • ►  February (10)
    • ►  January (20)
  • ►  2010 (168)
    • ►  December (15)
    • ►  November (11)
    • ►  October (12)
    • ►  September (24)
    • ►  August (13)
    • ►  July (12)
    • ►  June (8)
    • ►  May (17)
    • ►  April (14)
    • ►  March (9)
    • ►  February (16)
    • ►  January (17)
  • ►  2009 (5)
    • ►  December (5)
Powered by Blogger.

About Me

Unknown
View my complete profile