Dynamics GP Font Size

Increasing font size for GP users with poor eyesight

Increase GP font sizes

Today one of my co-workers from the infrastructure team asked me to include a “magic file” into our standard GP deployment. The file is activated via a registry key on the user’s machine and provides them with a bigger font experience when using Dynamics GP in conjunction with font scaling on the windows operating system.

Font scale in windows

Font scaling in windows is found by typing into the start menu “scaling”…

 

Make everything bigger in Windows 10

Then you can scale up the system fonts…

Font scale in windows 10

 

Font Scale in GP

To make this sit well with Dynamics GP you need to apply this technique.

The required file is named “Dynamics.exe.manifest” and is dropped into the program files directory side by side with the application.  The contents of the manifest file are below:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

 

The manifest file is “activated” and the bigger font experience is enabled using a registry key change on the user machine:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide] "PreferExternalManifest"=dword:00000001

 

Thus the GP fonts are scaled up for the users that are using font scaling on the operating system.

 

It was also brought to my attention that newer builds of Windows 10 have a whole subsystem that is attempting to grapple with the DPI scaling issues. I would assume this is a UI for the same system that the manifest file is activating?

Right click on an executable and go down the rabbit hole…

Windows 10 Advanced DPI compatability menu

 

 

Reference:

After being shown this, I realised I’d seen this “hack” before before and remembered it was from Steve Endow’s blog:

Fix Dynamics GP scaling and font size issues on high DPI displays

- where in this case he was trying to solve a slightly different problem with hi DPI displays, so thanks to Steve our users are benefitting every day from a more comfortable ERP experience.

Windows scaling issues for high-DPI devices

 

 

If you found this helpful do comment, it motivates me to blog more!

Microsoft Dynamics GP–United Kingdom, Making Tax Digital (VAT) for business MTD / MTSfb

Update: 3rd Aug 2018

Steven MacDonald @SteMac_mhance kindly pointed out on twitter in July that this requirement was being reviewed for inclusion in Dynamics GP2018 R2. 

 

Today, Ian in a post over on his blog, points out a status change on the MTD suggestion Microsoft Dynamics GP and Making Tax Digital

This certainly sounds promising from the MS Suggestion Site https://experience.dynamics.com/ideas/idea/?ideaid=366ea083-6029-e811-bbd3-0003ff68ba15

We are in the process of implementing the changes needed for the Making Tax Digital initiative in the UK. Stay tuned for updates as to when this will be released. 

Original post:

Making Tax Digital is a Her Majesty's Revenue and Customs (HMRC) introducing a mandatory electronic filing of VAT (tax) returns by business by using an application that supports their application programming interface (API). VAT records must be maintained and submitted digitally after April 2019. HMRC are encouraging software developers to engage with them to create applications to interoperate with their APIs HMRC Blog - Digital Relationship Management – A new era in 3rd party software collaboration. Xero and other software companies have been working on the private Beta of the APIs for some time, but what about Microsoft?

HRMC - Overview of Making Tax Digital

HMRC Overview of Making Tax Digital

 

Dynamics GP, SMB products and Making Tax Digital VAT submission MTD

Microsoft Dynamics products AX, NAV, 365 Finance & Operations will all enable customers to be compliant,  the details of how is yet to become clear, perhaps bridging software?

Microsoft Dynamics community- Are you using our accounting software Dynamics NAV or Dynamics 365 Business Central and worried about compliance with Making Tax Digital?

Did you know the Microsoft SMB ERP products also include Dynamics GP too? -Dynamics GP already allows VAT to be recorded electronically and even has the VAT daybook functionally. You would think it not too great a leap to create a little helper application that could pluck the records from the database and submit them via the HMRC web API. It is disappointing that in April 2018 all we have from Microsoft is this page for users of GP.

VAT 2019 digital regulations for Microsoft Dynamics GP

that points to the suggestion list for new features for GP…

Suggestion: GP needs VAT electronic filing to be compliant with Making Tax Digital initiative

So one may think from this that there are no plans in action at the moment for it to be supported, on the other hand you could take the view this is Microsoft acknowledging the requirement, perhaps Terry may well have had her ear bent by the UK Dynamics partners thus creating this page? Admittedly it is a year away and the MS developers can work quite quickly when they need to. Also to be fair this product suggestion site is the funnel through which new features/requirements should be captured, so perhaps it is in hand?

However it would be nice to know soon if UK customers need to find another 3rd party bridging software to the HMRC APIs soon so we can start answering our Finance Directors and Controllers questions about what the plan is for 2019 (and yes that question sparked this blog post).

 

Spreadsheets

What is amusing is that HMRC have announced that spreadsheets are acceptable when used with bridging software to the APIs – heaven knows what accountants would do without them!

“Businesses will be able to continue to use spreadsheets for record keeping, but they must ensure that their spreadsheet meets the necessary requirements of Making Tax Digital for Businesses. This is likely to involve combining the spreadsheet with software.”

Accounting web- Spreadsheets for Making Tax Digital – The universal language of accounting

 

I will update this post if there are further developments over the year.

Setting multi-line text box control in a Microsoft Dynamics GP add-in to be empty or blank

When working with multi-line text boxes (Text Tool), rather than single line edit boxes, it is easy to introduce a bug to your application.

Blank edit box in Dynamics GP Addin

The text box contents can be set with the the example code below:

ItemMaint.LocalTxtExtraInfo.Value = result.ExtraInfoDescription

…where the value of the right hand side is written to the control’s value and is thus displayed.

As the record set is scrolled, by for example, the user using the form’s scroll buttons, then this code may be called repeatedly to show this field’s value for each record in turn.

The problem I experienced, occurs when after displaying a value for the first record in the field, a subsequent record happens to be empty. In this case  the empty string is assigned to the control’s value, but the control does not blank itself in the user interface. In fact in debug, looking at the control’s value immediately after setting it to string.empty, it is found that the value has not changed from the previous record. 

So we have found that the field is not updated if an empty string is assigned to it. This seems to be a design decision in the  way the objects have been designed to behave. Hence the field will retain the previous record’s value until the next non-blank value in encountered in the record set.

This not only misleads the user as the incorrect field data is displayed for what should be an empty field, but it also, if the record is “saveable” of writing that wrong value back to the database, thus corrupting the field’s value “permanently” in the database (this is what brought my attention to the issue).

So if this control is used in your addin- always remember to use the following pattern, or equivalent to check for empty values. This uses the fields clear method to correctly empty the field on empty strings.

If result.ExtraInfoDescription.Length = 0 Then
ItemMaint.LocalTxtExtraInfo.Clear()
Else
ItemMaint.LocalTxtExtraInfo.Value = result.ExtraInfoDescription
End If

Note:
This behaviour is not followed by the normal edit boxes, they will blank when string.empty is assigned to them.

 

If you found this helpful, feel free to comment, it helps motivate me to write more!

Dynamics GP basic pricing export to Excel with crosstab SQL

 
The following SQL table function allows exporting of GP prices into Excel.
Assumes max of 6 price breaks, but can be expanded.
 
Usage:
SELECT * FROM [Extract_PricesCrosstabTable_Fast] ('GBP','TRADE','%') ORDER BY ITEMNMBR
 
Function:
-- =============================================
-- Author: Tim Wappat
-- Create date: 2010-08-02
-- Description: Function to crosstab price breaks for price level

-- Faster set based non-cursor version of crosstab for pricing
-- =============================================

CREATE FUNCTION [Extract_PricesCrosstabTable_Fast] (
@CURNCYID VARCHAR(15)
,@PRCLEVEL VARCHAR(11)
,@PATTERN NVARCHAR(31) = '%'
)

RETURNS @ReturnTable TABLE (
[ITEMNMBR] [varchar](31) PRIMARY KEY NOT NULL
,[BREAK1] [varchar](255) NOT NULL
,[PRICE1] [numeric](19, 5) NULL
,[BREAK2] [varchar](255) NOT NULL
,[PRICE2] [numeric](19, 5) NULL
,[BREAK3] [varchar](255) NOT NULL
,[PRICE3] [numeric](19, 5) NULL
,[BREAK4] [varchar](255) NOT NULL
,[PRICE4] [numeric](19, 5) NULL
,[BREAK5] [varchar](255) NOT NULL
,[PRICE5] [numeric](19, 5) NULL
,[BREAK6] [varchar](255) NOT NULL
,[PRICE6] [numeric](19, 5) NULL
)
AS
BEGIN

WITH PriceTableCte (
itemnmbr
,curncyid
,prclevel
,uomprice
,fromqty
,toqty
,[PriceBreak]
)
AS (
SELECT ITEMNMBR
,CURNCYID
,PRCLEVEL
,UOMPRICE
,FROMQTY
,TOQTY
,ROW_NUMBER() OVER (
PARTITION BY ITEMNMBR
,PRCLEVEL
,CURNCYID ORDER BY TOQTY ASC
) AS 'PriceBreak'
FROM IV00108
WHERE ITEMNMBR LIKE @PATTERN
AND PRCLEVEL = @PRCLEVEL
AND CURNCYID = @CURNCYID

)
INSERT @ReturnTable
SELECT ITEMNMBR
,isnull(max(CASE
WHEN PriceTableCte.[PriceBreak] = 1 THEN LTRIM(CONCAT(STR(FROMQTY, 6, 0), '+'))
END), '') AS PriceBreak1
,max(CASE
WHEN PriceTableCte.[PriceBreak] = 1 THEN UOMPRICE
END) AS Price1
,isnull(max(CASE
WHEN PriceTableCte.[PriceBreak] = 2 THEN LTRIM(CONCAT(STR(FROMQTY, 6, 0), '+'))
END), '') AS PriceBreak2
,max(CASE
WHEN PriceTableCte.[PriceBreak] = 2
THEN UOMPRICE
END) AS Price2
,isnull(max(CASE
WHEN PriceTableCte.[PriceBreak] = 3 THEN LTRIM(CONCAT(STR(FROMQTY, 6, 0), '+'))
END), '') AS PriceBreak3
,max(CASE
WHEN PriceTableCte.[PriceBreak] = 3
THEN UOMPRICE
END) AS Price3
,isnull(max(CASE
WHEN PriceTableCte.[PriceBreak] = 4 THEN LTRIM(CONCAT(STR(FROMQTY, 6, 0), '+'))
END), '') AS PriceBreak4
,max(CASE
WHEN PriceTableCte.[PriceBreak] = 4
THEN UOMPRICE
END) AS Price4
,isnull(max(CASE
WHEN PriceTableCte.[PriceBreak] = 5 THEN LTRIM(CONCAT(STR(FROMQTY, 6, 0), '+'))
END), '') AS PriceBreak5
,max(CASE
WHEN PriceTableCte.[PriceBreak] = 5
THEN UOMPRICE
END) AS Price5
,isnull(max(CASE
WHEN PriceTableCte.[PriceBreak] = 6 THEN LTRIM(CONCAT(STR(FROMQTY, 6, 0), '+'))
END), '') AS PriceBreak6
,max(CASE
WHEN PriceTableCte.[PriceBreak] = 6
THEN UOMPRICE
END) AS Price6
FROM PriceTableCte

GROUP BY ITEMNMBR
,CURNCYID
,PRCLEVEL
ORDER BY ITEMNMBR;

RETURN
END;