Top Categories:
Dynamics GP
ClassicPress

ClassicPress Plugin Development: Loading Back-End Scripts

ClassicPress PluginsThis post is part of the ClassicPress Plugin Development series in which I am going to look at both best practice for developing plugins and how I approach some requirements as well as some of the functions I commonly use.

jQuery itself is automatically loaded by ClassicPress so we don’t need to do anything to load this ourselves in a plugin; it is just our own jQuery script which we need to register and enqueue. There is two ways in which scripts can be loaded in a plugin; I will cover them both, but will note first of all that I typically use the second approach; there is an argument that the first approach is the “correct” one.

The first thing to do when you are loading a script is to register it. This is done using the wp_register_script function which ClassicPress provides.

Continue reading “ClassicPress Plugin Development: Loading Back-End Scripts”

ClassicPress Plugin Development: Loading Front-End Scripts

ClassicPress PluginsThis post is part of the ClassicPress Plugin Development series in which I am going to look at both best practice for developing plugins and how I approach some requirements as well as some of the functions I commonly use.

jQuery itself is automatically loaded by ClassicPress so we don’t need to do anything to load this ourselves in a plugin; it is just our own jQuery script which we need to register and enqueue. There is two ways in which scripts can be loaded in a plugin; I will cover them both, but will note first of all that I typically use the second approach; there is an argument that the first approach is the “correct” one.

The first thing to do when you are loading a script is to register it. This is done using the wp_register_script function which ClassicPress provides.

Continue reading “ClassicPress Plugin Development: Loading Front-End Scripts”

SQL View to Return Microsoft Dynamics GP Item Number Split by Hyphens

Microsoft Dynamics GPAs with most of the other views I have posted, this is one I have written a few times over the years and am now posting it to make it easy to find next time I need it.

This view returns the Item Number from the Item Master (IV00101) table split into sections by hyphens. It assumes the item number has up to three sections, but can easily be extended.

With the view deployed, it can easily be included in any reporting tool, such as SmartList Designer/Builder or a refreshable Excel Report.

/*
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). */
-- drop view if it exists IF OBJECT_ID(N'uv_AZRCRV_ItemNumberSplitByHyphens', N'V') IS NOT NULL DROP VIEW uv_AZRCRV_ItemNumberSplitByHyphens GO -- create view CREATE VIEW uv_AZRCRV_ItemNumberSplitByHyphens AS SELECT DISTINCT ITEMNMBR ,RTRIM(SUBSTRING(REPLACE(ITEMNMBR, '-', REPLICATE(' ', LEN(ITEMNMBR))), (0) * LEN(ITEMNMBR)+1, LEN(ITEMNMBR))) AS SECTION_1 ,RTRIM(SUBSTRING(REPLACE(ITEMNMBR, '-', REPLICATE(' ', LEN(ITEMNMBR))), (1) * LEN(ITEMNMBR)+1, LEN(ITEMNMBR))) AS SECTION_2 ,RTRIM(SUBSTRING(REPLACE(ITEMNMBR, '-', REPLICATE(' ', LEN(ITEMNMBR))), (2) * LEN(ITEMNMBR)+1, LEN(ITEMNMBR))) AS SECTION_3 FROM IV00101 AS ['Item Master'] WITH (NOLOCK) --Item Master (IV00101) GO

GRANT SELECT ON uv_AZRCRV_ItemNumberSplitByHyphens TO DYNGRP
GO[/postcode]

It would also be quite easy to amend the view to split out other strings based on a character using a variation of the above SQL script.

Microsoft Dynamics GP Purchasing All-In-One View Product 258 Error

Microsoft Dynamics GPI’m working on an implementation project at the moment to migrate a company from an older ERP into Microsoft Dynamics GP for an existing client using Dynamics GP and have been doing a lot of training. One area I covered was the All-in-One View enquiries in Purchasing, Inventory and Sales. After the training one of the users have exploring the system and found that the drilldown from an invoice on the Purchasing All-in-One View (Purchasing area page » Inquiries » Purchasing All-in-One View) wasn’t working.

We hadn’t noticed this in training as I had used a payment and purchase order as examples of the drill down. The error the client was seeing was this:

Error Message

Unhandled script exception:
Invalid Product ID 258.

EXCEPTION_CLASS_SCRIPT_OUT_OF_RANGE
SCRIPT_CMD_CALL

It rang a bell and when I checked found a post by Mariano Gomez in 2017 where he found this error in Dynamics GP 2015 R2 and 2016 RTM; I tested and it is also in 2018 and 2018 R2, but not in 2019 or 2020.

In the comments of Mariano’s blog, someone commented that marking and unmarking the Project Accounting entry ()Project Accounting is product 258) in the Registration window (Administration area page » Setup » System » ). I tested this on my system and it did remove the error so can discuss this workaround with the client.

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:

Business Intelligence with Microsoft Dynamics GP
In May is Controls and Security in Microsoft Dynamics GP; Discover how Business Intelligence can improve visibility and help you make better, more timely, decisions.

Tue, May 18th, 2021 4:00 PM – 4:45 PM BST

Use Jet Analytics to harness multiple data sources for fast, reliable reporting and analytics. Through OLAP cubes and tabular models, you can easily report inside Excel or Power BI, with no coding and without requiring technical expertise.

Use PowerBI to create interactive, immersive dashboards and reports that provide actionable insights and drive business results.

Register Here

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

ClassicPress Plugin Development: Loading Back-End Stylesheets

ClassicPress PluginsThis post is part of the ClassicPress Plugin Development series in which I am going to look at both best practice for developing plugins and how I approach some requirements as well as some of the functions I commonly use.

All of the plugins I have written have a settings page in the admin dashboard, either for settings to be configured or for instructions on how to use the plugin. I often have an admin stylesheet which needs to be loaded on the settings page. There is two ways in which stylesheets can be loaded in a plugin; I will cover them both, but will note first of all that I typically use the second approach. There is an argument that the first approach is the “correct” one.

The first thing to do when you are loading a stylesheet is to register it. This is done using the wp_register_style function which ClassicPress provides.

Continue reading “ClassicPress Plugin Development: Loading Back-End Stylesheets”

ClassicPress Plugin Development: Loading Front-End Stylesheets

ClassicPress PluginsThis post is part of the ClassicPress Plugin Development series in which I am going to look at both best practice for developing plugins and how I approach some requirements as well as some of the functions I commonly use.

Virtually all of the plugins I have written have output to the front end of a site, usually through use of shortcodes. As there is front end output, I have needed to create a stylesheet which means the plugin needs to load it. There is two ways in which stylesheets can be loaded in a plugin; I will cover them both, but will note first of all that I typically use the second approach. There is an argument that the first approach is the “correct” one.

The first thing to do when you are loading a stylesheet is to register it. This is done using the wp_register_style function which ClassicPress provides.

Continue reading “ClassicPress Plugin Development: Loading Front-End Stylesheets”

GeneralUser Error When Migrating Management Reporter to a New Server

Microsoft Dynamics GPAcross the years since it was launched I have done a lot of work with Management Reporter, including many migrations to new servers and upgrades which necessitated a migration to a new server or instance of SQL Server, but have never seen this particular error message before.

In this case, I migrated the Management Reporter database to a new server and installed the very latest version of the server software. When I started the database configuration, I received this error message:

Database configuration error

Validation Messages

Database configuration: The connection to the database was successful, but the connection to database 'Management Reporter' failed. Verify that the Management Reporter service account has been added to the General User role in the database.

Continue reading “GeneralUser Error When Migrating Management Reporter to a New Server”

Update Microsoft Dynamics GP Customer Emails on Test Including Sent Emails

Microsoft Dynamics GPAfter creating a new script for updating vendor emails on test which includes the emails of sent items, I figured that a similar script will be needed to update the email address on sent emails in the Sales Series.

The script below, includes the tables holding sent email information for the Sales Series emails (both Receivables Management and Sales Order Processing) as well as the usual Internet Addresses table; the highlighted email address can be changed to whatever email address you’re using for testing your Sales emails:

/*
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 @TestEmail VARCHAR(100) SET @TestEmail = 'email@example.com' -- UPDATE existing email addresses UPDATE SY01200 --Internet Addresses (SY01200) SET INET1 = @TestEmail ,EmailToAddress = @TestEmail ,EmailCcAddress = '' ,EmailBccAddress = '' WHERE Master_Type = 'CUS' -- UPDATE Email Details of previously sent emails UPDATE SY04910 --Email Details (SY04910) SET EmailToAddress = @TestEmail ,EmailCcAddress = CASE WHEN LEN(CAST(EmailCcAddress AS VARCHAR(1000))) = 0 THEN '' ELSE @TestEmail END WHERE MODULE1 IN (9,11) -- Receivables Management / Purchase Order Processing -- UPDATE Email Details of previously sent emails UPDATE SY04915 --Email History (SY04915) SET EmailToAddress = @TestEmail ,EmailCcAddress = CASE WHEN LEN(CAST(EmailCcAddress AS VARCHAR(1000))) = 0 THEN '' ELSE @TestEmail END WHERE MODULE1 IN (9,11) -- Receivables Management / Purchase Order Processing GO

Update Microsoft Dynamics GP Vendor Emails on Test Including Sent Emails

Microsoft Dynamics GPAbout 10 years ago I did a post on changing emails on the test system so they didn’t go outside the organisation. This has worked well for a long time and no-one has mentioned any issues, until this week when I was working with a client and we made some changes to a remittance format and tested by emailing.

The remittance itself emailed to the test address fine, but the reprint remittance went to the original email address of the vendor used on the live system.

After doing a little exploring I found there were two additional tables which held this data for sent emails and which were used by the reprint remittance function.

The script below, includes the Internet Addresses table as well as these two tables for the Purchasing Series emails (both Purchase Order Processing and Payables Management); the highlighted email address can be changed to whatever email address you’re using for testing your Purchasing emails:

/*
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 @TestEmail VARCHAR(100) SET @TestEmail = 'email@example.com' -- UPDATE existing email addresses UPDATE SY01200 --Internet Addresses (SY01200) SET INET1 = @TestEmail ,EmailToAddress = @TestEmail ,EmailCcAddress = '' ,EmailBccAddress = '' WHERE Master_Type = 'VEN' -- UPDATE Email Details of previously sent emails UPDATE SY04910 --Email Details (SY04910) SET EmailToAddress = @TestEmail ,EmailCcAddress = CASE WHEN LEN(CAST(EmailCcAddress AS VARCHAR(1000))) = 0 THEN '' ELSE @TestEmail END WHERE MODULE1 IN (12,19) -- Purchase Order Processing / Payables Management -- UPDATE Email Details of previously sent emails UPDATE SY04915 --Email History (SY04915) SET EmailToAddress = @TestEmail ,EmailCcAddress = CASE WHEN LEN(CAST(EmailCcAddress AS VARCHAR(1000))) = 0 THEN '' ELSE @TestEmail END WHERE MODULE1 IN (12,19) -- Purchase Order Processing / Payables Management GO