SQL Function to Return Last Workflow Final Approval Date

Microsoft Dynamics GPThe below SQL function returns the last Microsoft Dynamics GP workflow final approval date and time; it is always returned, not just when final approved is the current status.

This function was created to be used in a check of approved documents to see when they had last been approved; it was used in conjunction with the SQL function which returns the current workflow status.

IF object_id(N'uf_AZRCRV_GetLastWorkflowFinalApprovalDate', N'FN') IS NOT NULL
    DROP FUNCTION uf_AZRCRV_GetLastWorkflowFinalApprovalDate
GO
CREATE FUNCTION dbo.uf_AZRCRV_GetLastWorkflowFinalApprovalDate(@WorkflowTypeName CHAR(50),@WfBusObjKey CHAR(200))
	RETURNS DATETIME
AS
/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
BEGIN RETURN ISNULL(( SELECT TOP 1 FORMAT(['Workflow History'].Workflow_Completion_Date, 'yyyy-MM-dd') + ' ' + FORMAT(['Workflow History'].Workflow_Completion_Time, 'HH:mm:ss.fff') FROM WF30100 AS ['Workflow History'] INNER JOIN WFI10002 AS ['Workflow Master'] ON ['Workflow Master'].WorkflowInstanceID = ['Workflow History'].WorkflowInstanceID WHERE ['Workflow Master'].Workflow_Type_Name = @WorkflowTypeName AND ['Workflow Master'].WfBusObjKey = @WfBusObjKey AND ['Workflow History'].Workflow_Action = 10 ORDER BY ['Workflow History'].DEX_ROW_ID DESC) ,'1900-01-01 00:00:00.000') END GO GRANT EXECUTE ON uf_AZRCRV_GetLastWorkflowFinalApprovalDate TO DYNGRP GO

Centralising Dictionaries in Microsoft Dynamics GP

Microsoft Dynamics GPFor as long as I’ve been working with Microsoft Dynamics GP, I’ve been setting clients up with centralised forms and reports dictionaries in order to simplify deployment. As long as you’re not using VBA which needs to be installed onto each client, centralising the forms and reports dictionaries means you can import and customisations omly once. If each client machine has its own local forms and reports dictionaries then you need to import onto every computer.

This week when I did this, I ran into problems getting the path working correctly. I’m sure I didn’t do anything differently than normal, but it didn’t work. It took me a few minutes to get sorted out, so I am posting the below path as a reminder than you can use a UNC path for accessing the remote dictionaries, but the slashes are backslashes instead:

//FILESERVER/Dynamics Central/Dictionaries/REPORTS.DIC

As long as you have a good network, centralising the forms and reports dictionaries is my recommendation to ensure that all clients have exactly the same customisations in use. You would not centralise the application dictionaries, just the ones for forms and reports.

Setting a Default Location for the Integration Manager Database

Microsoft Dynamics GPIntegration Manager installs with a sample database in the install folders as the default database. In virtually every case, the clients I work with have a centralised database shared by all clients. While users can amend the path through the Integration Manager application, you can also add a setting in the Microsoft.Dynamics.GP.IntegrationManager.ini file (by default located in C:\Program Files (x86)\Microsoft Dynamics\Integration Manager 18) to change the location for all users.

Under the [IMBaseProvider] heading add the following line where the highlighted section is the path to the database:

DBPath=\\fileserver\Integrations\IM.mdb

Slow Login Into One Microsoft Dynamics GP Company

Microsoft Dynamics GPI’m working on a few projects for a client at the moment and became aware that logging into their main company was taking almost a minute. Most of the work had been in subsidiaries at the start of the projects, but we’ve moved into the main company now. The subsidiaries are quite quick to log into, say 10 seconds, but the main company was over a minute.

It didn’t matter if this was logging into Dynamics GP itself or just switching between companies. Everything else was running normally (entering or posting transactions and running reports), but as I investigated I found that the problem was specifically related to the loading of the Dynamics GP home page and it was only affecting out user account (I confirmed with the client that they were not seeing speed problems when loading the home page).

The problem turned out to be very prosaic; there were a number of SmartList reminders setup for sales and inventory which were all running before the home page displayed. The main company is where most of the inventory is processed so these reminders are checking large numbers of items and related transactions; removing these favourites from our user restored the quickness of the home age in the main company.

Being able to use SmartList favourites as reminders is good, but if there are a few of them on large datasets, then they can have an impact on performance. As it was just our user account, I was able to remove the reminders without impact; I think they had been added when showing users how to add reminders. If this speed was affecting a user, I would look to see if the reminders could be removed and, if not, create some SmartList Builder (if they have it, otherwise SmartList Designer) which only select the relevant subset of data (such as by selecting only from the work table and not the history table).

New Location For The Microsoft Dynamics GP Developer Documentation On Microsoft Docs

Microsoft Dynamics GPI’ve been using, off and on, the eConnect developers documentation for a number of years. However, it seems that Microsoft have now closed down the old location and moved the documents to the Microsoft Docs website.

The new location is here.

I’m posting this here as it took me a long time to actually find the new location.

Microsoft Dynamics GP 2021 Mid-Year Update Released

Microsoft Dynamics GPThe 2021 Mid-Year update for Microsoft Dynamics GP 2016 and Fall 2020 (18.3) has been released. Full details of the release and download links are available on the Dynamics GP Support and Services Blog.

The key piece of new functionality is support for Group VAT functionality in the VAT 100 window in the 18.3 release (this new functionality has not been rolled back to Dynamics GP 2016).

The below fixes have been made to the Fall 2020 Release only ones noted with GP 2016 have been rolled back to that version):

  • MFA: GP calls MSGraphSignOut of form syEmailObj after every completed e-mail operation.
  • All Workflow escalation email notifications are not being sent as expected when a workflow is escalated.
  • Workflow Approval Email notification being sent instead of Final Approval Email when the step after it does not require approval.
  • A User is not able to receive more than two attachments in E-mail when MFA is enabled.
  • When assigning a Workflow Manager in a multi-domain environment, users from Domain B are unable to save a manager.
  • Failed logins are not properly tracked when using Activity Tracking in Dynamics GP.
  • All 1099 amounts (including less than minimums) print on 1099 incorrectly if any box in 1099 details meets a minimum required value (Fixed on GP 2016).
  • The 1099 NEC needs to work with Project Accounting employee expense and default into the entry window. (Fixed on GP 2016).
  • Remove Multi Currency Fully applied documents from PM HATB (Feature from Fall 2020 resolved).
  • Transfer pricing is not applied when you transfer from a contract to a quote.
  • You may receive an error Get/change operation on table ‘Batch Header’ when two users use the Sales Document look up.
  • You may notice a focus issue on the Purchase Order Entry window with Manufacturing installed and you enter 2 lines to link.
  • You may receive an error message ‘the budget does not exist for this Purchase Order, when you receive against a Project Accounting PO that was has multiple Projects.
  • When you approve Project Timesheets, you may see an error message The formal parameter @emailtemptable was not declared as an OUTPUT parameter.
  • Payables Copy and Paste feature does not work when MC (multi-currency) is not registered.
  • Human Resource VET 4212 report overstates the count if more than one VET box is marked on employee maintenance window.
  • Benefit Self Service Administer View does not recognize the Archive Flag when determining enrollment.
  • Payroll integration to Payables remit to address maybe incorrect when you post to payables.
  • VAT 100 Window Display issue after you install the January 2021.
  • Analytical Accounting CheckLinks updates the aaGLDistID and aaBrowseType incorrectly.
  • Protocol change for Australian ABN look up (Fixed on GP 2016).

lightbulb Important note regarding Dynamics GP 2016

Microsoft have announced that this will be the last update for Dynamics GP 2016; you will not receive a year end update for this version. If you are using Dynamics GP 2016, it is recommended that you start planning to upgrade to the 18.3 release or 18.4 release due in Fall 2021.

The announcement post on the available on the Dynamics GP Support and Services Blog has more details including download links for other languages, or you can download the English language hotfixes using the direct links below (logon to CustomerSource required):

User Has Error Logging Into Microsoft Dynamics GP: The stored procedure smCleanupFilesBeforeLogin…

Microsoft Dynamics GPI’ve been working with a client a lot recently, so when one of their users was not able to log into Microsoft Dynamics GP today, they got in touch.

The problem only affected one user who got the below error message; all other users were unaffected and could log in normally:

Error message

The stored procedure smCleanupFilesBeforeLogin returned the following results: DBMS: 0, Microsoft Dynamics GP: 20505.

This sort of issue is covered in a Microsoft KB article.

The first three possibilities listed, could be ruled out as they would have affected more than just one user; the final option, records stuck in either the SACTIVITY or Batch Activity (SY00800) tables.

I used the below script to check for corrupt records (the highlighted section is the user id to check for):

SELECT * FROM ACTIVITY WHERE userid = 'userid'
SELECT * FROM SY00800 WHERE userid = 'userid'

Once I had confirmed the records were present, I used the below scripts to delete the stuck rows:

DELETE FROM ACTIVITY WHERE userid = 'userid'
DELETE FROM SY00800 WHERE userid = 'userid'

Upcoming Microsoft Dynamics GP Webinars from ISC Software

ISC Software SolutionsEvery month at ISC Software I present a webinar on Microsoft Dynamics GP and related products. We typically have the next three upcoming monthly webinars I’ll be delivering scheduled.

We run these webinars on a monthly basis, with occasional extra webinars added to the schedule so it is worth checking the Webinar Schedule page every so often.

The upcoming webinars are:

Personalising  Microsoft Dynamics GP
In June is Personalising Microsoft Dynamics GP; Learn how users can personalise their Dynamics GP experience.

Tue, June 15th, 2021 4:00 PM – 4:45 PM BST

In this webinar we’ll take a look at the standard functionality in Dynamics GP which allows users to tailor their homepage to fit their needs and ways they can use this to work smarter, not harder

Register Here

Lesser Used Modules in Dynamics GP
In July is Lesser Used Modules in Dynamics GP; Explore some of the lesser used modules of Microsoft Dynamics GP and how they can improve processes.

Tue, July 20th, 2021 4:00 PM – 4:45 PM BST

This webinar will look at the modules included in the Microsoft Dynamics GP Starter and Extended Packs, picking out some of the modules which can save time but which aren’t as commonly used.

Register Here

Microsoft Dynamics GP Workflow
In August is Microsoft Dynamics GP Workflow; Discover how workflow can be used to require documents and master record changes to be approved, and enforce segregation of duties.

Tue, August 17th, 2021 4:00 PM – 4:45 PM BST

This webinar will look at the workflow approval types available in Dynamics GP and how they can be used to require documents or master record changes, or document submission to be approved. It will then delve further into the types of steps and routings available within workflow.

Register Here

Recent ISC Software Webinar: Business Intelligence with Microsoft Dynamics GP

ISC Software SolutionsIn our most recent webinar, we took a look at Business Intelligence with Microsoft Dynamics GP. In this webinar, we covered how business intelligence can be used with Microsoft Dynamics GP. If you want to catch up on this, or any other, webinar, you can do so here.

  1. Introduction
  2. What is Business Intelligence?
  3. What is Jet Analytics?
  4. Reporting options with Jet Analytics
  5. What is Power BI?
  6. Reporting options with Power BI
  7. Conclusion

Introduction ^

I think this webinar was the first one in which we didn’t even open Microsoft Dynamics GP. This because this webinar focused on how business intelligence can be used with Microsoft Dynamics GP. We focused on two business intelligence products which can be used to quickly build required dashboards and reporting for business intelligence.

The two products we looked at are complimentary and can be used both together or independently. They are Jet Analytics and PowerBI

Continue reading “Recent ISC Software Webinar: Business Intelligence with Microsoft Dynamics GP”

VBA Snippets: Select Records from Microsoft Dynamics ODBC Connection

MicrosoftThis post is part of the series on VBA Snippets.

In yesterdays post, I covered adding an ODBC connection to Microsoft Dynamics GP VBA for use n windows or reports. The below is an example of a SQL query using the ODBC connection.

SOPType and SopNUmber (highlighted) are fields from a window added to the VBA.

This example retries a list of fields from the Sales Transaction Amounts Work (SOP10200) table.

Dim objRS As ADODB.RecordSet
Set objRS = New ADODB.RecordSet
Set objRS.ActiveConnection = madoConn
sSQL = "SELECT * FROM SOP10200 WHERE SOPTYPE = " & SOPType & " AND SOPNUMBE = '" & SOPNumber & "'"
objRS.Source = sSQL
objRS.Open

If objRS.State = adStateOpen Then
	If Not (objRS.BOF Or objRS.EOF) Then
		objRS.MoveFirst
		
		Do While Not objRS.EOF
			' your code goes here; reference fields using objRS.fields("fieldname"))
		
			objRS.MoveNext
		Loop
	End If
	objRS.Close
End If
Set objRS = Nothing