Microsoft Dynamics GP Workflow Approval SQL Views: Payables Transactions

Microsoft Dynamics GPThis post is part of the Microsoft Dynamics GP Workflow Approval SQL Views series and contains a SQL view to return the workflow approval status of payables transactions.

-- drop view if it exists
IF OBJECT_ID(N'uv_AZRCRV_PayablesTransactionApprovalStatus', N'V') IS NOT NULL
	DROP VIEW uv_AZRCRV_PayablesTransactionApprovalStatus
-- create view
CREATE VIEW uv_AZRCRV_PayablesTransactionApprovalStatus AS
Created by Ian Grieve of azurecurve|Ramblings of an IT Professional ( This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
WITH PMTrxApprovals AS ( SELECT ['Workflow Instance Master'].WfBusObjKey ,['Workflow History'].Workflow_History_User ,['Workflow History'].Workflow_Completion_Date ,['Workflow History'].Workflow_Completion_Time ,['Workflow History'].Workflow_Name ,['Workflow History'].Workflow_Step_Name ,CASE WHEN ['Workflow History'].Workflow_Action = 1 THEN 'Submitted' WHEN ['Workflow History'].Workflow_Action = 2 THEN 'Resubmitted' WHEN ['Workflow History'].Workflow_Action = 3 THEN 'Approved' WHEN ['Workflow History'].Workflow_Action = 4 THEN 'Task Complete' WHEN ['Workflow History'].Workflow_Action = 5 THEN 'Rejected' WHEN ['Workflow History'].Workflow_Action = 6 THEN 'Delegated' WHEN ['Workflow History'].Workflow_Action = 7 THEN 'Recalled' WHEN ['Workflow History'].Workflow_Action = 8 THEN 'Escalated' WHEN ['Workflow History'].Workflow_Action = 9 THEN 'Edit' WHEN ['Workflow History'].Workflow_Action = 10 THEN 'Final Approved' END as Workflow_Approval_Status ,['Workflow History'].Workflow_Comments ,ROW_NUMBER() OVER(PARTITION BY ['Workflow Instance Master'].WfBusObjKey ORDER BY ['Workflow History'].Workflow_Completion_Date DESC, ['Workflow History'].Workflow_Completion_Time DESC) AS ROW_ID FROM WF30100 AS ['Workflow History'] WITH (NOLOCK) INNER JOIN WFI10002 AS ['Workflow Instance Master'] WITH (NOLOCK) ON ['Workflow Instance Master'].WorkflowInstanceID = ['Workflow History'].WorkflowInstanceID WHERE ['Workflow Instance Master'].Workflow_Type_Name = 'Payables Transaction Approval' AND ['Workflow History'].Workflow_Action <> 11 ) SELECT -- transaction information ['PM Key Master File'].CNTRLNUM AS 'PO Number' ,['Payables Document Types'].DOCTYNAM AS 'Document Type' ,['PM Key Master File'].VENDORID AS 'Vendor ID' ,['PM Vendor Master'].VENDNAME AS 'Vendor Name' ,['PM Key Master File'].DOCDATE AS 'Document Date' -- approval information ,PMTrxApprovals.Workflow_Name AS 'Workflow Name' ,PMTrxApprovals.Workflow_Step_Name AS 'Workflow Step Name' ,PMTrxApprovals.Workflow_History_User AS 'Workflow User' ,PMTrxApprovals.Workflow_Approval_Status AS 'Workflow Approval Status' ,PMTrxApprovals.Workflow_Completion_Date AS 'Workflow Completion Date' ,PMTrxApprovals.Workflow_Completion_Time AS 'Workflow Completion Time' ,PMTrxApprovals.Workflow_Comments AS 'Workflow_Comments' FROM PM00400 AS ['PM Key Master File'] WITH (NOLOCK) INNER JOIN PM00200 AS ['PM Vendor Master'] WITH (NOLOCK) ON ['PM Vendor Master'].VENDORID = ['PM Key Master File'].VENDORID INNER JOIN PM40102 AS ['Payables Document Types'] WITH (NOLOCK) ON ['Payables Document Types'].DOCTYPE = ['PM Key Master File'].DOCTYPE LEFT JOIN PMTrxApprovals ON PMTrxApprovals.WfBusObjKey = CAST(RTRIM(['PM Key Master File'].CNTRLNUM) AS VARCHAR(20)) + '~PM_Trxent' AND PMTrxApprovals.ROW_ID = 1 GO -- grant permissions GRANT SELECT ON uv_AZRCRV_PayablesTransactionApprovalStatus TO DYNGRP GO

Microsoft Dynamics GP Workflow Approval SQL Views: Series Index

Microsoft Dynamics GPA couple of years ago, I posted a SQL view which returned the status of general ledger batches.

I’ve recently been working with a few clients with workflow in Purchasing and a common request was being able to report on the status of documents.

I have three views which were created and which I will post over the next few days. If I create additional ones in future, I’ll tag them into this post.

Microsoft Dynamics GP Workflow Approval SQL Views
Show Workflow Approval Status of posted Microsoft Dynamics GP General Ledger batches
Payables Transactions

Get Serial Number Count and Length in Microsoft Dynamics GP

Microsoft Dynamics GPI needed to check how many serial numbers were assigned to sales transactions and the cumulative length of them. I’m not aware of any function in Microsoft Dynamics GP which would give me this information, so I wrote the below SQL statement to return both values along with the transaction type and document number.

It selects from the Sales Serial/Lot Work and History (SOP10201) table which, allowing for a simple statement, includes both the work and history data (SOP transactions don’t have a status of open).

Created by Ian Grieve of azurecurve|Ramblings of an IT Professional ( This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */

Fixed Asset Depreciation Not Calculating in Microsoft Dynamics GP

Microsoft Dynamics GPI was on a call with a client the other day looking at a few issues with them in Microsoft Dynamics GP. One of the issues was that they had been setting up the Fixed Asset Management module, but when they ran depreciation, nothing happened.

We did some exploring and the only difference I could find, from who I would have normally configured the module, was that the Fixed Asset Calendar ((Financial » Setup » Fixed Assets » Calendar)) had been configured only for the required years starting in 2020; I usually set it up for a 200 year period.

The first asset being setup was dated in period 12 of 2020 so there is no logical reason why prior years should be needed. However, after we added 2019 into the calendar and re-ran the depreciation, all of the assets depreciated correctly.

Bug With End Of Month Payment Terms in Microsoft Dynamics GP

Microsoft Dynamics GPI was onsite with a client recently and was asked about a problem they were seeing with payment terms. Specifically, the issue was with end of month payment terms where the due date was sometimes being calculated incorrectly. They’d done some testing and identified that it was when the invoice date was the last day of the month that the due date ws incorrect.

I did some testing in Fabrikam and have been able to reproduce this error on all versions of Dynamics GP which I tried.

To reproduce, set a payment term configured with Due set to EOM and Add Days to 30:

Payment Terms Setup of an EOM payment term

Continue reading “Bug With End Of Month Payment Terms in Microsoft Dynamics GP”

Integration Manager Error – “Source Recordset ‘1’ not found’

Microsoft Dynamics GPI was talking to a client on a Teams meeting a while ago and they took the opportunity to ask about a problem they were having with Integration Manager.

When they tried to run a n integration to import Payables Transactions they were receiving an error:

Error message

Integration Manager

The integration cannot be run because of the following problem(s):

- Source Recordset '1' not found - used for Record Source option on collection 'Tax Details'.

The resolution to this is as straightforward as the cause is annoying. Sometimes when you make a change in one part of an integration, a configuration in another part disappears. In this case the Record Source on the options tab of the Tax Details node had been erased. Simply setting the option back to the correct source and saving the integration will fix the issue:

Tax Details node Options

SmartConnect Crashes When Trying to Run Integration into Microsoft Dynamics GP

eOne SolutionsI dealt with a support issue for a client recently where they were reporting that one user could integrate into all but two companies in Microsoft Dynamics GP, but other users couldn’t integrate into any.

The problem is that when they tried an integration which failed, SmartConnect simply crashed with nothing in any error logs in either SmartConnect or Windows.

As it was working in some databases and not others for one user and not at all for other users, it had to be permissions. The user who could use SmartConnect was the one involved in the implementation and the companies he could use it in were the oldest; the two companies which failed were the newest.

We did some checking and found that the user who could run some integrations had his domain account created as a SQL login and had been granted the DYNGRP security role on the company databases; he had not been added to the companies which failed. When we added the security for these databases the integration ran successfully.

We recommended to the client that instead of adding individual users to SQL Server and giving them access to databases they consider creating some AD security groups which had access assigned and they could then grant those roles to users as required.

Recent ISC Software Webinar: A Macro Overview for Microsoft Dynamics GP

ISC Software SolutionsIn our most recent webinar, we took a look at A Macro Overview for Microsoft Dynamics GP. In this webinar, we took a look at what Microsoft Dynamics GP macros are, how they can be used and ran through some examples. If you want to catch up on this, or any other, webinar, you can do so here.

A Macro Overview for Microsoft Dynamics GP

  1. Introduction
  2. What are macros and how to use them
  3. Pitfalls
  4. Recording and Playing Macros
  5. Macro by Mail Merge
  6. Macro by Excel
  7. Macro by SQL
  8. Conclusion

Introduction ^

in this webinar we took a look at macros in Microsoft Dynamics GP, giving an overview of what they are how they can be used and ran through some examples of how they could be used.

I have previously blogged about macros in Dynamics GP and the webinar was along similar lines, albeit using different examples.

Continue reading “Recent ISC Software Webinar: A Macro Overview for Microsoft Dynamics GP”

Implementing SmartView for Microsoft Dynamics GP: Review

eOne SolutionsThis post is part of the Implementing SmartView for Microsoft Dynamics GP series were I am taking a look at the SmartView product from eOne Solutions which provides another way of using SmartLists.

It’s been quite a while since I’ve used SmartView myself; I tend to either use SmartList or directly query the database. I’ve done a lot with SmartList Builder, creating many SmartLists over the years.

I’ve had a few clients use SmartView but many decided the extra cost of the module wasn’t worth the functionality. With the change to the licensing where SmartView comes packaged with SmartList Builder and Popdock under the new subscription licensing, I’ve had a couple of clients take a look at it and decide to implement the module.

In one case, simply because it is now included they’ll have a look and see how they get on with it. In the other case, they’d only had Dynamics GP implemented last year and were using SmartList Builder. When I told them they now had access to SmartView as well and explained the functionality, they were very keen; especially the SmartView external component as it allows them to use one SmartList object for users who both are and aren’t Dynamics GP users. This means they can avoid creating two separate reports and potentially two versions of the truth.

By having the same SmartList object accessible to both types of user they can be sure that they are all seeing the same data.

I think it is worth having a discussion with other users too as I think that many people will have more of an interest in this module with the changes to the licencing. And even without that change, I think it is worth taking a look at for the additional flexibility that SmartView brings over standard SmartLists.

Feature The SmartView advantage
Speed SmartView provides the solution for anyone that has ever waited impatiently for a SmartList to refresh. For example, if you run the Sales Line item list in SmartList, it would take 2.5 minutes to return 4259 rows. If you use SmartView you get the exact same data returned in 7 seconds!
Excel Cut and Paste selected records directly from SmartView to Excel, Word or an email.
Full Screen Use every bit of your screen to view our data. No more white spaces!
Unlimited Filters There is no limit at all on the number of filters you can have. You can mix and match AND’s and OR’s to get exactly what you are looking for.
Single Screen Eliminate up to 7 mouse clicks, by having everything on one screen.
Group Group your data by any field, by a simple drag and drop function. It’s like creating your own reports on the fly.
Sub Total When you group you will receive auto subtotaling of all you data. So group by customer to see totals by customer.
Sort Sort how you please, even by a number of columns simultaneously.
GoTo’s All the goto’s from SmartLists and SmartList Builder are available to make navigation into Microsoft Dynamics GP a breeze.
Export Export your lists to PDF, Excel or CSV. SV has been timed at being 10 times faster than a SmartList export.
Multiple Instances Open multiple instances of SmartView to let you multi task and look at multiple lists simultaneously.
Columns Add, remove and reorder columns by simply dragging and dropping where you’d like them to go.
Restrictions Only see the data you need, when you need it.
Favorites Create the view you go back to most and save it as a favorite. You can even share that with your team.
Searching Searching across all your data or by column.

Implementing SmartView for Microsoft Dynamics GP: Accessing SmartView External

eOne SolutionsThis post is part of the Implementing SmartView for Microsoft Dynamics GP series were I am taking a look at the SmartView product from eOne Solutions which provides another way of using SmartLists.

Once users have been configured for SmartView External, they can get logged in and start using SmartView from outside Dynamics GP.

SmartView External is available to users from the Windows Start menu; when launched they will be prompted to log on using their external user and password.

If a user is both a Dynamics GP and SmartView External user they will need to remember that these logins are different. To login enter your external user details:


Continue reading “Implementing SmartView for Microsoft Dynamics GP: Accessing SmartView External”