Add Company Access Back to sa User

Microsoft Dynamics GPWe’re busy doing some work for a client for whom we’ve recently taken over the support of their Microsoft Dynamics GP implementation. For the initial set of projects, we’re assisting them in the creation of a standalone test systemm. When you do this, the first thing you need to do is log in using the sa account and reset passwords.

However, we found that at some point in the past, all company access had been removed from the sa user account leaving us unable to log into Dynamics GP.

Fortunately, company access is only stored within one table in the system database: User-Company Access (SY60100).

The SQL below will add company access back to the sa user for all company databases:

/*
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (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).
*/
INSERT INTO SY60100
	(TRKUSER,USERID,CMPANYID,SRBCHSEC_1,SRBCHSEC_2,SRBCHSEC_3,SRBCHSEC_4,SRBCHSEC_5,SRBCHSEC_6,SRBCHSEC_7,SRSFNSEC_1,SRSFNSEC_2,SRSFNSEC_3,SRSFNSEC_4,SRSFNSEC_5,SRSFNSEC_6,SRSFNSEC_7,MSCPRMIS)
--VALUES
	(
	SELECT
		0,'sa',CMPANYID,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
	FROM
		SY01500 AS ['Company Master']
	WHERE
		(
		SELECT
			COUNT(*)
		FROM
			SY60100 AS ['User-Company Access']
		WHERE
			['User-Company Access'].CMPANYID = ['Company Master'].CMPANYID
		AND
			['User-Company Access'].USERID = 'sa'
		) = 0
	)
GO

After you’ve run the above to add company access back, you also need to run the SQL insert statement in this post to add POWERUSER access as well.

With the two scripts run, the sa account can be used to reset the DYNSA user and other user accounts.

Find SQL Function In All Databases

Microsoft SQL ServerI did a few posts back in 2016 on finding objects in SQL (a column in all tables, all custom sql objects in a database and trigger in all databases).

I needed to find if a function existed in all databases, so I produced the following script which searches in all Microsoft Dynamics GP databases:

-- drop stored proc if it exists
IF OBJECT_ID (N'usp_AZRCRV_FindFunctionInAllDatabases', N'P') IS NOT NULL
    DROP PROCEDURE usp_AZRCRV_FindFunctionInAllDatabases
GO

-- create stored proc
CREATE PROCEDURE usp_AZRCRV_FindFunctionInAllDatabases
	@Function VARCHAR(50) = 'uf_AZRCRV'
AS
	/*
	Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (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).
	*/
	DECLARE @command nvarchar(max)

	SELECT @command = 'IF EXISTS ( SELECT 1 FROM SY01500 AS [''Company Master''] INNER JOIN sys.databases [''Sys Databases''] ON [''Company Master''].INTERID = [''Sys Databases''].name WHERE name = ''?'')   
						BEGIN
							USE [?];
							DECLARE @stmt nvarchar(max) DECLARE @n char(1) SET @n = char(10)
							SELECT DB_NAME() AS ''DB_NAME'',t.name FROM sys.objects AS t
							WHERE t.type_desc LIKE ''%FUNCTION%'' 
							AND t.name LIKE '''+ @Function + '%''
						END'

	EXEC sp_MSforeachdb @command
GO

-- grant execute permission on stored proc to DYNGRP
GRANT EXECUTE ON usp_AZRCRV_FindFunctionInAllDatabases TO DYNGRP
GO

-- execute stored proc
EXEC usp_AZRCRV_FindFunctionInAllDatabases 'dgpp'
GO

Is there a POP Historical Received Not Invoiced Report Available?

Microsoft Dynamics GPI’ve had a couple of people recently ask if it is possible to get a historical version of the Shipments Received but not invoiced* SmartList favourite (located under Purchasing » Receivings Line Items).

Within SmartList, this is not possible as the point-in-time calculations required for a historical report are too complex for a SmartList, even one driven by a view.

While historically this report wasn’t available in Microsoft Dynamics GP, this changed in the Microsoft Dynamics GP 2015 R2 release when a Reporting Services Report version of a Historical Received Not Invoiced Report was introduced. It seems though that many people are remain unaware of this new Historical RNI report.

As long as you have the Reporting Services Reports from the Reporting Tools Setup window deployed you can launch the report from the Purchasing series Reporting Services Reports navigation pane:

Historical Received Not Invoiced

This report allows you to enter criteria including a Date as of.

Currency ID Missing From Batches Integrated Via eConnect

Microsoft Dynamics GPWe’ve been doing some work with a client recently creating a number of integrations in SmartConnect. One of these was creating General Journals into a consolidation company from other Microsoft Dynamics GP databases.

Everything looked fine from a SmartConnect perspective; success reported for the integration and no warnings or errors. However, when we looked at the resulting journal, there was no Currency ID:

General Transaction Entry showing blank Currency ID field

The problem here isn’t actually a SmartConnect one, but an eConnect one which has been known for a long time. There are a number of reports of this, but the one we found when researching was on the Dynamics Blogger.

The solution is to create a chequebook (checkbook) for the Functional Currency.

The company we were importing into, didn’t have one as only the GL was going to be used; once the chequebook was created, the integration worked fine.

Implementing SmartList Builder: Review

eOne SolutionsThis post is part of the series on Implementing SmartList Builder from eOne Solutions.

Of all of the ISV products I have used with Microsoft Dynamics GP, SmartList Builder is the one I have worked with the longest, and is the one I like the most (looking back I’m surprised it’s taken me this long to do a series like this).

It is easy to use, flexible and far better at creating new SmartLists than the in-built SmartList Designer product which Micro created when they passed SmartList Builder back to eOne Solutions.

If you like SmartLists, then I would encourage you to take a look at SmartList Builder; it does take a somewhat technical user to create and maintain SmartLists through it, but they are easy to create and much more flexible than those possible through SmartList Designer. The hardest job is sometimes discovering how the data hangs together.

There are resources such as the GP Tables section of Victoria Yudin’s website or my azurecurve|Microsoft Dynamics GP Table Reference which you can use to find the tables you need.

Implementing SmartList Builder: Security

eOne SolutionsThis post is part of the series on Implementing SmartList Builder from eOne Solutions.

The final element to readying SmartList Builder for use is to configure security so that users without the POWERUSER* role can access it. While this step isn’t absolutely necessary, I would encourage people not to over use the POWERUSER* role.

A better approach would be to create a Super User role instead. Both this role and standard user roles will need to have access to the SmartList Builder windows granting.

This is easy to do, as SmartList Builder ships with some default security tasks and a role:

Security Role Setup

Assign this role to the relevant user or assign the tasks to existing roles and user will, next time they login, be able to access the SmartList Builder window.

Implementing SmartList Builder: Register

eOne SolutionsThis post is part of the series on Implementing SmartList Builder from eOne Solutions.

If you’re testing SmartList Builder, you can use it in the Famrikam Sample company without entering a registration key. However, yo use it on a normal company, even a test one, you will need to input the key.

To do this, log into Microsoft Dynamics GP as a user with the POWERUSER* role and open the SmartList Builder Register window (Administration area page » Setup » SmartList Builder » Register SmartList Builder) and enter the key in the Registration Key field:

SmartList Builder Register

Click Save to sdave the key and close the window.

Implementing SmartList Builder: Download and Install

eOne SolutionsThis post is part of the series on Implementing SmartList Builder from eOne Solutions.

SmartList Builder is downloaded direct from the eOne Solutions website as a zip file.

Download SmartList Builder

Continue reading “Implementing SmartList Builder: Download and Install”

Implementing SmartList Builder: SmartList Builder vs. SmartList Designer

eOne SolutionsThis post is part of the series on Implementing SmartList Builder from eOne Solutions.

As mentioned in the last post SmartList Builder was directly sold by Microsoft under a licensing agreement for many years until, with the launch of Microsoft Dynamics GP 2013 SP2, the product was released back to the original ISV; a Fargo based ISV called eOne SOlutions.

I understand this was because the new top person in charge of Microsoft Dynamics GP did not like licensing products from the ISVs and release quite a few back to the original developer. However, this left a gap in Microsoft Dynamics GP in that users could no longer create new SmartLists. And so, SmartList Designer was created.

In theory it fulfils the same job as SmartList Builder; you can create new SmartLists by joining tables together or by linking in a SQL view. When it was first released, I took a look at it as an alternative to SmartList Builder on the basis it was free as opposed to needing to buy SmartList Builder.

However, in every area, it is an inferior product. It is not as functional and it is not as easy to use.

Continue reading “Implementing SmartList Builder: SmartList Builder vs. SmartList Designer”

Implementing SmartList Builder: What is SmartList Builder?

eOne SolutionsThis post is part of the series on Implementing SmartList Builder from eOne Solutions.

Before launching into the installation of SmartList Builder, I thought it might be worthwhile to do a post on what it is. All users of Microsoft Dynamics GP will be familiar with SmartList; this is the flexible reporting tool which allows you to generate a report showing a list of master records or transactions. Each series has a set of SmartLists available by default, with predefined favourites where search criteria or columns are supplied already configured.

SmartList favourites can be customised and new ones created quite easily, but new SmartLists themselves cannot be created. To create a new SmareList, you need a tool such as SmartList Builder or, in more recent years, SmartList Designer. In this series, I am focussing on SmartList Builder as this is an additional product available from an ISV for Microsoft Dynamics GP.

Back in 2003 when I started working with Microsoft Dynamics GP, SmartList Builder was available direct from Microsoft. SmartList Builder was originally developed by eOne Solutions and then licensed by Microsoft; in the run up to the release of Microsoft Dynamics GP 2013 SP2, the licensing deal for SmartList Builder was ended and maintenance of the product reverted back to eOne Solutions.

SmartList Builder the product, includes four utilities:

  1. SmartList Builder – SmartList Builder allows you to create both brand new SmartLists or modify existing SmartList. You can link up to 32 tables together. Tables can be standard GP tables, any of the Third Party (ISV) tables, any SQL table, SQL views or SQL Scripts, other SmartLists or Extender resources.
  2. Excel Report Builder – Excel Report Builder generates an Excel Spreadsheet with a live connection back to GP or any other data you include. This means you have live refreshable reports, anytime you need them. You can give all your data from GP to anyone in the organization via Excel – without buying new, full-user licenses of Dynamics GP.
  3. Drill Down Builder – Drill Down Builder completes the functionality of Excel Report Builder by letting you drill from your spreadsheet back into that same record within Dynamics GP. Where Microsoft hard codes a drill down – eOne makes it completely configurable to allow you to drill down to any screen or SmartList in Dynamics GP. This is an essential part of bringing the most common business tools together. Working in GP and Excel all day – it only makes sense to auto-switch between one and the other.
  4. Navigation List Builder – Navigation List Builder allows you to publish your SmartList into the Navigation List user interface.

The standard installation of the SmartList Builder product, gets you all four of the above utilities.