Friday, January 27, 2017

Deploying Microsoft Dynamics GP Web Client with Office 365 Identity and Azure Active Directory - Part 1

Hi! As of late I have been seeing a number of questions on forums about deploying Microsoft Dynamics GP Web Client using Office 365 identity. So I figured I would take a deep dive look into this topic, by providing a bit of background and steps to achieve a successful deployment. What you need to know is, you have a range of options.


Background

Office 365 uses Azure Active Directory (Azure AD) cloud-based user authentication service to manage users. This service provides 3 identity models that can be used to manage user accounts:


Cloud identity. In this scenario, accounts are managed in Office 365 only. All the administration is done in the cloud, requiring no on-premise servers to manage the accounts.

Synchronized identity. In this particular case, your on-premise directory objects are synchronized with Office 365, with the bulk of the administration done from your on-premise server. Passwords can be synchronized such that users have the same password both on-premises and in the cloud. The downside to this approach is, users will need to sign in twice: once to the local domain and yet again to access Office 365.

Federated identity. This identity management model allows you to synchronize your on-premises directory objects with Office 365 and manage your users on-premises. The users have the same password on-premises and in the cloud, and they do not have to sign in again to use Office 365. This is often referred to as single sign-on.


The following video describes in more detail how each of these identity models work:



Most organizations will fall within the Synchronized or Federated model, but as more and more organizations move to a pure cloud model, cloud identities are becoming very common.

In my next article, I will go into the pre-requisites to deploy Microsoft Dynamics GP Web Client with Office 365.

Until next post!

MG.-
Mariano Gomez, MVP

Wednesday, January 25, 2017

Revisiting: Microsoft Dynamics GP's PerformancePoint Server Connector

I realize this one is a really obscure topic, but I thought it was important to bring it to light. Microsoft Office PerformancePoint Server was an actual thing, it existed, and to the surprise of everyone reading this and not in the channel long enough to remember, Dynamics GP had a connector to it.


Summary

Microsoft Office PerformancePoint Server was a business intelligence software product released in 2007 by Microsoft. It was discontinued in 2009, then resurfaced with its dashboard, scorecard, and analytics capabilities incorporated into SharePoint Server 2010 - the feature was known as PerformancePoint Services in SharePoint Server 2013. PerformancePoint Server also provided a planning and budgeting component directly integrated with Excel. However, by 2009, the actual Microsoft Dynamics GP connector for PerformancePoint was also discontinued.

Back in 2008, I wrote a stub article about it for an article published by Alan Whitehouse. You can read more about it here:

A First Look at GP's PerformancePoint Connector by Alan Whitehouse

Dynamics GP took full advantage of SharePoint, to address deficiencies in the document management and workflow areas. PerformancePoint provided the Business Intelligence capabilities lacking at the time. With the introduction of GP 2015, Workflow went the way of Dexterity and Windows Workflow Foundation, a lot of the document storage capabilities went the way of Document Attach, which brings me to the BI portion that PerformacePoint addressed at the time.

Business Intelligence with Power BI

The BI track has taken multiple twists and turns - and will probably continue to as new(er) tools come to market. First it was PerformancePoint, then it was Corporate Performance Management, then it was KPIs in SQL Server Reporting Services (SSRS) - those are still around by the way, then came Excel Dashboards, but with the introduction of Dynamics GP 2016 came the integration of Microsoft Power BI. You can read more about it here:

Microsoft Dynamics GP 2016 - Power BI Feature

Power BI allows users to create powerful visualizations without ever drawing a single line of code: point to your data source, setup the type of visualization you want, and off you go.


There are some pre-requisites to configure Power BI. The first and foremost is to register to use Power BI. You can do this by going to https://powerbi.microsoft.com/en-us/. This is actually pretty straight forward if you are already registered for any of the Microsoft online services like Office 365, Dynamics 365, or Windows Azure.

Once you've done this, you can then register an application by going to https://dev.powerbi.com/apps.


The documentation on the Microsoft Dynamics GP Support and Services blog provides additional information on how to fill in this page, so no need to rehash here. Finally, you will setup visualizations to show up on Microsoft Dynamics GP's home page by going to the Reporting Tools Setup window.

In a next article, I will upload a video to my YouTube channel showing how to get started.

Until next post!

MG.-
Mariano Gomez, MVP

Monday, January 23, 2017

"Get-Content : Cannot find path 'C:\en-US\Welcome.txt' because it does not exist" error when running GPPowerShellStart.ps1

Lately, I have been dabbing into PowerShell. The truth is, I had been wanting to do this for the past 3 years now, to switch from DOS batch files and VBScript to a more robust, developer-like task automation alternative. So I thought myself PowerShell over the past few days and, in doing so, I decided I'd look into the GP PowerShell feature, so off I went installing it.

Summary

Directly from the PowerShell TechNet page, "Windows PowerShell® is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows." More on PowerShell here.

GP PowerShell is available for Microsoft Dynamics GP 2013 and above and can be found on the main application setup page.

Setup page
A couple clicks and you are ready to go.

The Problem

The GP PowerShell components install under the Microsoft Dynamics GP folder which contains a startup script, GPPowerShellStartupScript.ps1. A quick look at the code in Windows PowerShell ISE (or Notepad) quickly points out that this script is supposed to retrieve the path from where the script is being launched, concatenate said path with the locale, obtained from the .NET culture (in my case en-US, English United States) and the name of the file, Welcome.txt, to then show its content.

$ScriptRoot = $MyInvocation.PSScriptRoot


$GPPowerShellConfig = "$ScriptRoot\GPPowerShell.dll.config"
[appdomain]::CurrentDomain.SetData("APP_CONFIG_FILE", $GPPowerShellConfig)
Add-Type -AssemblyName System.Configuration

$Locale = (Get-UICulture).Name
if (Test-Path "$ScriptRoot\$Locale\Welcome.txt")
{
    Get-Content "$ScriptRoot\$Locale\Welcome.txt"
}
else
{
    Get-Content "$ScriptRoot\en-US\Welcome.txt"
}


However, when this script is executed, I immediately get the error:

Get-Content : Cannot find path 'C:\en-US\Welcome.txt' because it does not exist.
At C:\Program Files (x86)\Microsoft Dynamics\GPPowerShell\GP2015\GPPowerShellStartupScript.ps1:14 char:5
+        Get-Content "$ScriptRoot\en-US\Welcome.txt"
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo : ObjectNotFound: (C:\en-US\Welcome.txt:String) [Get-Content], ItemNotFoundException
          + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand


The Solution

One thing I like about PowerShell is, the errors are pretty clear and concise as to what the problem is, in this case the path to the welcome.txt file is incorrect, and based on the result, the culprit can only be the $MyInvocation.PSScriptRoot not returning the path corresponding to the script's launch location.

In doing some research, I found that the method of obtaining the path of the current running script depends on the version of PowerShell and .NET Framework you are running. For more information on PowerShell scripting engine requirements click here.

For PowerShell 3+, you can simple use the global variable $PSScriptRoot. For all version of PowerShell, the below method works well:

Split-Path $MyInvocation.MyCommand.Path -Parent

This led me to think that perhaps this problem could have been easily taken care of by providing a universal function that could be called within the script, but we will address the issue with the previous method, as follows:


$ScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
# $ScriptRoot = $MyInvocation.PSScriptRoot

$GPPowerShellConfig = "$ScriptRoot\GPPowerShell.dll.config"
[appdomain]::CurrentDomain.SetData("APP_CONFIG_FILE", $GPPowerShellConfig)
Add-Type -AssemblyName System.Configuration

$Locale = (Get-UICulture).Name
if (Test-Path "$ScriptRoot\$Locale\Welcome.txt")
{
    Get-Content "$ScriptRoot\$Locale\Welcome.txt"
}
else
{
    Get-Content "$ScriptRoot\en-US\Welcome.txt"
}


After making these adjustments, the script produces the expected result:

Welcome to the Microsoft Dynamics GP 2015 PowerShell module.
For a list of GP cmdlets type 'Get-Command -module GP2015'.
Use 'Set-GPSessionCentralAddress' to connect to your GP Session Central Service before executing any other GP cmdlet.

After all, what would be of this world without a warm welcome ;-)

Until next post!

MG.-
Mariano Gomez, MVP

Thursday, January 19, 2017

Revisiting: The Dexterity OLE Container

Welcome to the first article in my Revisiting series. Today I'm going to talk about the now defunct Dexterity OLE Container feature in Microsoft Dynamics GP. However, not because the technology is dead, it means that you don't have to deal with OLE notes. If you are coming from older versions of Microsoft Dynamics GP and upgrading to, say, GP 2013 R2 onward you have to be substantially aware of OLE notes: how are you going to migrate these and what is there in place to replace them.

Summary

In principle, OLE is a compound document technology from Microsoft based on the Component Object Model (COM). OLE allows an object such as a graphic, video clip, spreadsheet, etc. to be embedded into a document, called the Container Application. The Dexterity OLE Container is part of the Dexterity Shared Components. In OLE compound document technology, it is the OLE client application (CONTAIN.EXE), which holds the linked or embedded objects. The Dexterity OLE Container first surfaced with the release of Dexterity 3.0 in 1993.



It is important to note that the OLE client application and the OLE functionality is still available to Dexterity developers today, but the functionality began phasing out from Microsoft Dynamics GP since version 12 (GP 2013 R2) with the introduction of the Web Client. More on this below.

You can read my previous articles on the OLE Container, here:

All about the Dexterity OLE Container
More on OLE attachments and record notes
"You have too many note windows open. Close a note window" Error Message
All About Dexterity OLE Container - Follow Up
OLE Notes and Microsoft Dynamics GP 2013 Web Client

Document Attach

Document Attach (Doc Attach) 1.0 was introduced back in November of 2012 in a Feature of the Day article by Pam Misialek prior to the RTM release of Microsoft Dynamics GP 2013. Document Attach marked the beginning of the end of the OLE container notes feature in Microsoft Dynamics GP. Doc Attach 1.0 first addressed attachments in Sales Order Processing. With the introduction of Microsoft Dynamics GP 2013 service pack 2 in August of 2013, showed a marked improvement of the feature with delivery of key aspects like document flow, status tracking, password protection deletion, ability to establish properties for attached documents, ability to email attachments.



Microsoft also delivered a migration tool, the Microsoft Dynamics GP OLE Object Migration Utility, that would allow customers and partners to migrate the OLE container notes to the new Document Attach feature.

Dynamics GP 2015 completely phased out the OLE notes and delivered yet improved functionality with the introduction of the ability to scan documents straight into Doc Attach.

The Microsoft Dynamics GP OLE Migration Utility

The Microsoft Dynamics GP OLE Object Migration utility can help system administrators extract OLE objects that were attached to note records in the Microsoft Dynamics GP desktop client, and migrate them to document attachment records. Users can view and edit the attachments in the desktop client as well as the Microsoft Dynamics GP Web Client. If you don’t move your OLE objects to document attachment records, you will not be able to view and edit existing notes with OLE objects, or create new notes with OLE objects, in the desktop client. In addition, you won’t be able to create, view, or edit window- or record-level notes with OLE objects in the web client.

Using the utility is not required for implementing or using Microsoft Dynamics GP. If you haven’t used OLE objects, or will not be attaching notes in any format to records using the Microsoft Dynamics GP Web Client, you don’t need to use this utility. The utility was first made available for Microsoft Dynamics GP 2013 R2. If you haven’t used it with GP 2013 R2, but you have installed GP 2015, you can still install and run the utility.

The migration tool provides some automation of the process of transferring OLE Notes to document attachment documents. In some cases, the tool might not convert all your OLE Notes. For example, while many variations or file types of OLE Notes will migrate successfully, some file types might not. In those situations, if you need to retain the OLE Notes that do not convert, those notes must be manually attached in Document Attach.

You can download the Migration Utility Guide here for more information on prerequisites and overall use of the tool. You will need a valid CustomerSource or PartnerSource account to download.

Hopefully this review has been clear and concise and I welcome your comments.

Until next post!

MG.-
Mariano Gomez, MVP

Tuesday, January 17, 2017

New Year's Resolution

Well, hello everyone! I hope you had a great time with family and friends and that you are now cranking it in high gear to get this year started off on the right track. I know I am.

A little of what I'm working on...

As the Lead Software Engineer for Mekorma, my job is to make sure we build quality new products, while improving the capabilities of our existing offerings. To that effect, my team has been working on a really cool product that automates the entire processing of payments (checks, EFTs, and Credit Cards) and remittances by leveraging our existing MICR offering, all the while, delivering total Accounts Payable automation in the process. I am really excited to talk about this, so more on this in an upcoming article.


Blogging challenge for the New Year

One of the questions I get asked the most in my comments section is, "does this article still apply to the newer versions of GP?" Usually, the person asking the question is referring to versions GP 2015 R2, or GP 2016, and now GP 2016 R2? What I found surprising about this question wasn't so much the question itself, but in revisiting my articles, I have over 1000 that would qualify as "old". So I asked myself, "wouldn't it be cool to go back and revisit some of the older ones to see whether they still apply or not, or what changes they require for them to work with today's newer versions of GP?". In response, I will be revisiting as many articles as I can over the course of this year, and republishing them with newer code and better development patterns (where applicable), or even improved solutions noting whether there's standard functionality now available for what was covered before as a workaround.

Starting tomorrow, I will begin a new series called "Revisiting" where I will cover some of the old material I have on this site under the light of the newer GP versions - you asked, you got it! - all the while introducing new topics.


Community Activities and Events

This year, I have the honor to serve as Vice-chair of Association of Dynamics Professionals Credentialing Council Board. You can read more here. The Credentialing Council Board is the most senior leadership body of members of the Association of Dynamics Professionals (DynamicsPro) and is responsible for setting the direction for nearly all aspects of the association. I share the stage with a number of professionals from other disciplines like NAV and SL, and probably one of the most diverse group you will ever find, with folks hailing from Europe and the United States.

I have also taken an active role with my GPUG local chapter, GPUG Georgia, assisting with the planning and marketing of the 2017 quarterly meetings. I will also be delivering sessions at the local chapter meetings. Our goal is to improve participation while delivering rich content that all who attend can immediately leverage in their organizations. If you are currently an active GPUG member and you live in the Metropolitan Atlanta area, please see our Chapter page for more information.

I will also be participating as a speaker at GPUG Amplify 2017 in Anaheim, CA, GPUG Summit 2017 in Nashville, TN, and reIMAGINE 2017 in Fargo, ND. You may also see me at some international events, but that's still being worked out as I type. The following tune has been chosen as the theme song for this year's GPUG Summit.



Finally, this year I'm making an absolute commitment to attend the Microsoft MVP Global Summit 2017 in Seattle, Washington, assuming I get re-awarded as a Microsoft MVP to begin with, in July.

As you can tell, my blogging agenda, along with my agenda of activities and events is quite pack for this year. I hope to meet a good number of what I have planned for the year and see quite a few of you at the events I will be attending. Please join me in continuing to make Microsoft Dynamics GP the leading middle market ERP with over 47,000 customers world wide, by showing your support to your local GPUG chapter, joining the events whether you are a partner, a customer, or an ISV.
Until next post!

MG.-
Mariano Gomez, MVP