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 (https://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

Prepare New SD Card For Raspberry Pi OS: Download NOOBS

Raspberry PiThis post is part of the series on preparing a new SD card to install a new Raspberry Pi operating system; this series is a sub-series of the Adventures with a Raspberry Pi.

You have two options for operating systems available directly from Raspberry Pi; NOOBS and Raspbian.

NOOBS is the New Out Of Box Software which contains several operating systems accessible via an easy to use launcher.

Raspbian is the full Raspberry Pi operating system.

I have opted to use NOOBS for my micro-SD card as it includes a recovery console (hold down the shift key during boot). Download NOOBS from the Raspberry Pi downloads page. Click the large NOOBS image:

NOOBS download page

Continue reading “Prepare New SD Card For Raspberry Pi OS: Download NOOBS”

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.

Prepare New SD Card For Raspberry Pi OS: Format SD Card

Raspberry PiThis post is part of the series on preparing a new SD card to install a new Raspberry Pi operating system; this series is a sub-series of the Adventures with a Raspberry Pi.

With the SD Card Formatter Installed, it is time to format the SD card. Place the SD card into the card reader and launch SD Card Formatter from the Windows start menu.

Make sure the corrected card is selected and mark Overwrite Format and then click Next:

SD Card Formatter

Continue reading “Prepare New SD Card For Raspberry Pi OS: Format SD Card”

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.

Prepare New SD Card For Raspberry Pi OS: Install SD Card Formatter

Raspberry PiThis post is part of the series on preparing a new SD card to install a new Raspberry Pi operating system; this series is a sub-series of the Adventures with a Raspberry Pi.

With the SD Memory Card Formatter downloaded, we can now install it.

Extract and launch the application from the downloaded zip file:

Downloaded and extracted application

Continue reading “Prepare New SD Card For Raspberry Pi OS: Install SD Card Formatter”

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.

Prepare New SD Card For Raspberry Pi OS: Download SD Card Formatter

Raspberry PiThis post is part of the series on preparing a new SD card to install a new Raspberry Pi operating system; this series is a sub-series of the Adventures with a Raspberry Pi.

I am using a large capacity micro-SD card for install the new OS and it is recommended to use the SD Memory Card Formatter from the SD Association.

You can download the tool from here. Scroll down to the bottom of the page and click the blue For Windows button.

Continue reading “Prepare New SD Card For Raspberry Pi OS: Download SD Card Formatter”

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.