Tampilkan postingan dengan label Dynamics GP 2013. Tampilkan semua postingan
Tampilkan postingan dengan label Dynamics GP 2013. Tampilkan semua postingan

Rabu, 15 Februari 2017

VST: An error occurred while loading or initializing an addin

As I mentioned before, I am now the Lead Software Engineer at Mekorma. I love it here as I get to work with some really talented software engineers and developers, all of which challenge me everyday. One of the cool new products we are working on, Mekorma Multi-Batch Management, allows you to build payment batches, print and post payments, and generate electronic funds transfer (EFT) and positive pay (Safe Pay) files, across companies, and across multiple checkbooks, with some minor configuration and just the click of a button. You can see an in-depth video on the product here.


Part of the challenges of building Multi-Batch Management were its extensive interfacing with both our own Mekorma MICR product and Microsoft Dynamics GP, and in particular, the Safe Pay module - Multi-Batch Management is designed to drive the Microsoft Dynamics GP user interface, thus eliminating the need for invasive code.

If you have worked on integrating code for Microsoft Dynamics GP, you are certainly familiar with the challenges surrounding the response to Dexterity modal dialogs. This is true for Microsoft Dexterity service enabled procedures as much as it is true for standard applications like ours, that simply try to drive the user interface.

NOTE: Dexterity does not have a programmatic mechanism to respond to modal dialogs. As it stands, only Visual Basic for Applications (VBA) and Visual Studio Tools for Microsoft Dynamics GP (VST) provide event handlers for modal dialogs.

VST aids in responding to Dexterity modal dialogs by allowing a developer to define form or window level modal event handlers. Because our code needed to respond to dialogs in Safe Pay only when our process was running, it was necessary to create an application assembly for our dictionary, that we could then reference in a Visual Studio Tools project. In addition, we needed to reference the Safe Pay application assembly as well. The project reference looks something like this:


Project References

Once references are added to the project, the tendency is to immediately add all event handlers to the Initialize() method within the GPAddIn class, as shown below:


public void Initialize()
{
Dynamics.Forms.SyErrorMessage.SyErrorMessage.OpenBeforeOriginal +=
Dynamics_SyErrorMessage_OpenBeforeOriginal;
Dynamics.Forms.CmTransactionEntry.CmTransactionEntry.BeforeModalDialog +=
Dynamics_BeforeModalDialog;
Dynamics.Forms.CmEftGenerateFiles.CmEftGenerateFiles.BeforeModalDialog +=
Dynamics_BeforeModalDialog;
SafePay.Forms.MePpTransactions.MePpTransactions.BeforeModalDialog +=
new EventHandler(SafePay_Transactions_BeforeModalDialog);
}


Unfortunately, this approach has a problem: let's assume Safe Pay is not installed, therefore, the Safe Pay application dictionary and application assembly are missing from the Dynamics GP installation folder. Since the Initialize() method is the entry point to your VST application, when the runtime engine attempts to load your assembly, your application would contain a reference to a non-existing assembly. This in turn will cause the runtime engine to produce the following error:

"An error occurred while loading or initializing an addin. As your administrator to check the Windows event log for more details. Dynamics will now close."


This is always been accepted as "the way things work". Unfortunately, we couldn't live with the status quo as it meant that customers who did not require the Safe Pay module would have to install it just for the sake of our assembly not failing.

We then attempted to move our event handler registration into it's own method, enveloping the call in a try..catch block:


public void Initialize()
{
Dynamics.Forms.SyErrorMessage.SyErrorMessage.OpenBeforeOriginal +=
Dynamics_SyErrorMessage_OpenBeforeOriginal;
Dynamics.Forms.CmTransactionEntry.CmTransactionEntry.BeforeModalDialog +=
Dynamics_BeforeModalDialog;
Dynamics.Forms.CmEftGenerateFiles.CmEftGenerateFiles.BeforeModalDialog +=
Dynamics_BeforeModalDialog;

try
{
InitializeSafePay();
}
catch (Exception e)
{
throw new Exception(e.Message);
}
}

public void InitializeSafePay()
{
SafePay.Forms.MePpTransactions.MePpTransactions.BeforeModalDialog +=
new EventHandler(SafePay_Transactions_BeforeModalDialog);
}


The above produced virtually the same results. That is, the exception was still being displayed. Now, quite clearly, if we commented out the throw statement, the exception would no longer present itself and the message would not appear, precisely what we needed since we did not want to alert of the missing assembly and prevent the user from login into Dynamics GP.

NOTE: Alternatively, we implemented tracing capabilities for our assembly, so now all exceptions are recorded in a log file.

Special thanks to my Sr. Software Engineer, Lee Butenhoff for researching and providing a solution to this long standing issue.

Until next post!

MG.-
Mariano Gomez, MVP

Selasa, 14 Februari 2017

Revisiting: SOP Quick Print

Continuing with my Revisiting series, today I look at an article I wrote in 2009 regarding the SOP Quick Print feature.

Summary

SOP Quick Print is one of those gems in Microsoft Dynamics GP hidden within plain site. Written by my friend David Musgrave, it was designed to save time when saving and printing sales orders, fulfillment orders, and invoice. SOP Quick Print is activated by pressing CTRL + Q on your keyboard, and after a simple setup, it's good to go.

SOP Quick Print Setup window
One of the frustrating things about saving most documents in Dynamics GP, is that the window is cleared completely from the document that you were working on. Depending on what you are trying to achieve, this can be an inconvenience if all you wanted to do is save your document up to that point, so you can keep working on it. Current business logic would have you retrieving that document once more by either typing the document number or retrieving it via a lookup. With SOP Quick Print, you can save the document while keeping it displayed on the Sales Transaction Entry window.

SOP Quick Print and the Web Client

In order to achieve the printing and the saving of the document, SOP Quick Print creates a Dynamics GP macro on the fly, with the necessary macro lines (based on the selected options during configuration) to print, save, and retrieve the document when saved. The macro looks something like this:

ActivateWindow dictionary 'default'  form 'SOP_Print_Options' window 'SOP_Print_Options'
  MoveTo field 'Print Button NONE'
  ClickHit field 'Print Button NONE'
NewActiveWin dictionary 'default'  form 'Report_Destination' window 'Report_Destination'
  MoveTo field 'Print to Screen'
  ClickHit field 'Print to Screen'
  MoveTo field 'OK Button'
  ClickHit field 'OK Button'
PrintDialog copies 0 from 0 to 0


The macro is saved in the Data folder of the current instance.

The issue with macros is, they are not compatible with the Dynamics GP web client, so unfortunately, this great feature is not available when running the web client. But if you currently enjoy the desktop client, there should be absolutely no reason for you not to take advantage of this feature.

I have tested this across all newer versions of Dynamics GP, since GP 2013 and the feature continues to work as expected.

Until next post!

MG.-
Mariano Gomez, MVP

Kamis, 17 September 2015

Microsoft Dynamics GP Web Client no longer working on Google Chrome 45

If you had gotten used to running the Microsoft Dynamics GP web client on Google Chrome, chances are you have just woken up to the constant requests for installing the Silverlight plugin. You may have attempted the installation a few times by now, only to notice that you are still being requested to install Silverlight.

Microsoft Dynamics GP Web Client on Chrome 45 

Google Chrome users who normally relied on functionality that NPAPI plugins provided won't be able to make use of them anymore with the release of Chrome 45. NPAPI-only plugins such as Java or Silverlight are used throughout the web and while their use is declining, there are numerous applications and services that make use of either one or another plugin - for example, your beloved Microsoft Dynamics GP web client.

This Chrome Extensions article explains the security concerns behind the use of NPAPI-based plugins, mainly, the ability of said plugins to gain access to a user's local machines. Any security gaps in such plugins would render a user's machine vulnerable to exploits by malicious code.

However, this should not at all come as a surprise, since Google had it in the works to remove NPAPI support since September of 2013, see Saying Goodbye to Our Old Friend NPAPI, with Chrome 45 selected as target for final deprecation.

So what are the alternatives?

Well, you can fall back once more to Internet Explorer 10 (desktop), Mozilla Firefox, or even Apple's Safari. If my mind serves me correctly, the latter two will have some minor limitations (as in "may not be fully compatible").

Option number 2 would have you downgrading Chrome, if you are willing to get the installer from non-Google sites like Old Apps or File Hippo.

As a final note, the following browsers DO NOT support Silverlight:

Microsoft Internet Explorer 10 modern UI
Microsoft Edge (formerly code name Spartan, available on Windows 10)
Google Chrome (version 45 and above)
Opera (version 20 and above, current version is 32)

Until next post!

MG.-
Mariano Gomez, MVP

Jumat, 29 Mei 2015

"A SQL Server login already exists for . Delete the user and create a new user" error when switching a user ID from web client only to mixed mode access

I'm completing the deployment of Microsoft Dynamics GP 2013 R2's Project Accounting and Time Entry approval workflow for a customer in Alabama who is currently deploying web client for extranet access (and timesheet entry) and desktop client for intranet access.

As a result, since time entry employees are remote, we decided to setup these user accounts as web client only. However, the customer wanted to provide an alternative to the web client in case it became unavailable. This meant that these users would needed the ability to access the Microsoft Dynamics GP desktop client via a Terminal Server provisioned (albeit temporarily) to support this goal.

The Problem

To meet this requirement, we needed to adjust the user accounts in Dynamics GP to also support SQL Server authentication (in addition to web client access), by deselecting the Web Client user only check mark and completing the SQL Login credentials information. Upon attempting to save the changes we received the following error:

A SQL Server login already exists for userID. Delete the user and create a new user.


As it so turns out with most application errors, you cannot just follow the instructions literally to fix the problem. In this case, we had more than 85 web client only user accounts created so "Delete the user and create a new user" wasn't an option and I don't know why I had a gut instinct this recommendation would not work anyways.

It also turns out that I tested this in Microsoft Dynamics GP 2015 and had no issues switching a user account from Web Client user only to a mixed mode access user account.

NOTE: "mixed mode access" user is a terminology I came up with to identify a Microsoft Dynamics GP user account with access capabilities from both the web client and desktop client.

The Solution

In troubleshooting this problem, the first thing is to focus on the first part of the error message, "A SQL Server login already exists". If a login already exists on SQL Server, then it should be visible under Management Studio - bear in mind that each Dynamics GP user account was setup as a web client only account to begin with. In principle, there should be no SQL Server security principal for these type of accounts.

Management Studio did not show any account created for the Dynamics GP under the Security folder. So the next logical thing would be to run a statement to check for a SID for the account in question:

SELECT suser_sid('TheUserID');

This statement returned an actual SID number (a long hexadecimal set of characters), confirming at least there was a corresponding SID for the account, even though we could not see the actual account in Management Studio.

Next was to verify then, what account was assigned to that SID. In order to do this, I ran the following SQL statement:

SELECT name FROM sys.server_principals where sid = (SELECT suser_sid('TheUserID'));

As it turned out, this statement returned no results. So here's the conundrum... GP thinks there's a SQL login for a user account that doesn't really exists on SQL, but has a SID.

Now, because there wasn't an actual SQL login for the user ID in question, I went ahead and setup a new SQL login with the user account by running the following statement:

sp_addlogin('TheUserID', 'somePassword');

The statement was successful and I could now see the SQL login under the security folder.

The next thing was to then reset the Dynamics GP web client user flag and assign the SQL login to the user account:

UPDATE SY01400 SET WCUser = 0,  SQLLoginID = 'TheUserID' WHERE USERID = 'TheUserID';

Since Microsoft Dynamics GP passwords are encrypted on SQL Server, you will now need to log into Dynamics GP, pull up the user account under the User Maintenance window, and change the password in the SQL login credentials section.

I cannot assess whether this is a bug or not, but suffice to say the same behavior is not present in GP 2015, so I must lean towards it being a bug.

I hope you find these troubleshooting steps useful.

Until next post!

MG.-
Mariano Gomez, MVP

Kamis, 12 Februari 2015

Microsoft Dynamics GP 2015 Identity Management

Hi everyone! It's been hectic around here with a few projects going live in these days, in addition to preparations for Convergence 2015 here in Atlanta.

I wanted to draw your attention to two videos currently posted on the Microsoft Dynamics YouTube channel, related to the Identity Management feature.

Identity Management was introduced with Microsoft Dynamics GP 2013 R2, so is probably good to go back and review the original feature design goal with Tara Higgins with the Partner Technical Consulting team.



With Dynamics GP 2015, the feature was extended to cover authentication with organizational accounts, which provides single sign-on capabilities for Microsoft Azure AD accounts. Identity Management for organizational accounts is a web client feature only. Take a look at this video by my buddy Jason Lech with the Escalation Engineering team.



My goal is to release a video showing a real life example on how to set this up. So stay tuned.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Rabu, 07 Januari 2015

SOP Quick Print feature does not work when window ribbons are enabled

Happy New Year!! Hope all of you had a great time with family and friends and that you are back getting used to the daily grind once more.

Today, I want to kick off the year with an issue in Sales Transaction Entry window related to the cool ribbons implemented since Microsoft Dynamics GP 2013 R2. By now, you are probably getting used to the absolutely gorgeous user interface which features Microsoft Office style ribbons on every window. Furthermore, you probably already know that the use of such ribbons is actually customizable and in many ways optional - albeit being the default configuration - as described by fellow Microsoft Dynamics GP MVP, Leslie Vail in her article GP 2013 R2 Ribbons. As it turns out, there's a Dex.ini switch, EnableWCRibbons=FALSE, that controls whether ribbons are enabled within Microsoft Dynamics GP or not. When ribbons are enabled, users can further customize the appearance of the action pane or return to the traditional menu bar for each window.


User Preferences window

Yesteryear (2009), I wrote an article talking about The wonders of CTRL+Q: saving and printing SOP documents in one step and how the Quick Print feature made life easier to the poor souls out there who needed a quick shortcut to printing SOP documents from the Sales Transaction Entry window. In that article I detailed the mechanics behind the feature, written by my good friend David Musgrave.

As fortune would have it, when ribbons are enabled and you are either using the Action Pane or the Action Pane Strip layouts, the Quick Print feature does not work. However, if the User Preference is returned to Menu Bar (you will need to exit Dynamics GP and re-launch for the changes to take effect), the Quick Print option (and CTRL+Q keyboard combination) works just fine.

While clearly an inconvenience, this can hardly be labeled a bug since the feature is still present within the application when the Window Command Display setting is set to Menu Bar as part of the user preferences. It would be nice, however, to have this fixed for Dynamics GP in desktop client mode. I can see how this may or may not work under web client mode as the browser keyboard shortcut combinations take precedence over the application's shortcuts.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Senin, 15 Desember 2014

Microsoft Dynamics GP backups with Windows Azure Blob Storage Service - Follow up

As a follow up to my post yesterday (see Microsoft Dynamics GP backups with Windows Azure Blob Storage Service), an issue has been identified with Microsoft Dynamics GP 2015 running on SQL Server 2014 when choosing Microsoft Azure storage as the destination for the backup.

You will receive the following warning message:

The SQL Server version that you are using does not support backing up or restoring your database from Microsoft Azure storage.



I have traced the issue back to the logic in the '(L) RGRestoreBackupOption' of window BackupRestore of form syBackupRestore field change script, which seems to compare the build number even after it has determined the version number is greater than SQL Server 2012 SP1 CU2 (11.0.3339). Of course, the build number for SQL Server 2014 CU4 is 12.0.2430. Since 2430 is not greater than 3339, the script sets the validation flag to false, causing the script to abort with the message indicated above.

This problem is exclusive to Microsoft Dynamics GP 2015 RTM (14.00.0524) running on SQL Server 2014, and cannot be replicated if you are running Microsoft Dynamics GP 2013 R2 or Microsoft Dynamics GP 2015 on SQL Server 2012 SP1 CU2 or greater. Microsoft is currently aware of this situation (at least via the Dynamics GP Online Partner Technical Community Forum), but if you are

For more information on SQL Server 2014 build numbers, see Microsoft Support kb article 2936603, SQL Server 2014 build versions.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Minggu, 14 Desember 2014

Microsoft Dynamics GP backups with Windows Azure Blob Storage Service

With the introduction of Dynamics GP 2013 R2, Microsoft delivered support for application database backups onto Windows Azure blob storage service from within GP itself.

Azure Blob storage is a service for storing large amounts of unstructured data, such as text or binary data, that can be accessed from anywhere in the world via HTTP or HTTPS. You can use Blob storage to expose data publicly to the world, or to store application data privately. Common uses of Blob storage include:

• Serving images or documents directly to a browser
• Storing files for distributed access
• Streaming video and audio
• Performing secure backup and disaster recovery
• Storing data for analysis by an on-premises or Azure-hosted service

In turn, Dynamics GP takes advantage of capabilities introduced in SQL Server 2012 SP1 CU2 to enable SQL Server backup and restore directly to the Windows Azure Blob service. See SQL Server Backup and Restore with Windows Azure Blob Storage Service for more information.

Note: Starting with SQL Server 2012 SP1 CU4, you can also use PowerShell to backup to and restore from Windows Azure Blob storage services.

As part of the backup and restore process, Microsoft Dynamics GP calls the syGPAzureBackupRestoreProcess system database stored procedure.


Configuring Microsoft Dynamics GP backups with Windows Azure Blog storage service

To take advantage of Windows Azure Blob storage service, you must begin by setting up an Azure storage account. The storage account is the starting point for all storage services. The storage account requirements are fairly straight forward: setup a URL prefix, associate a location or affinity group for your storage account, and determine the type of replication. See How To Manage Storage Accounts for additional information on replication options.

Note: The full URL will be the URL prefix followed by blob.core.windows.net.

Storage Account Setup
Upon creation of the storage account, the storage account name and its access key properties are required to authenticate to the Windows Azure Blob Storage service and its components.

Following the creation of the account, you will need a storage container. A container provides a grouping of a set of Blobs, and can store an unlimited number of Blobs. To write a SQL Server backup to the Windows Azure Blob service, you must have at least the root container created.

Container tab

Click on the Containers tab to setup a new container. Enter a name for the container, and select the type of access that will be provided to the container.


New Container setup
For more information on setting container access types, see Restrict Access to Containers and Blobs. Once the container has been setup, you should see your new container listed.

Container is now setup

Return to the storage account dashboard and click the Manage Access Keys option at the bottom of the window for the storage account you setup. You can copy the primary access key, which will be used to setup Microsoft Dynamics GP.

Manage Access Keys

In Microsoft Dynamics GP, go to Microsoft Dynamics GP | Maintenance | Backup to open the Back Up Company window. Follow these instructions:

1. Select the company you wish to backup
2. Choose Use Microsoft Azure storage as the destination for your backup
3. Enter the storage account name you created in Windows Azure
4. Paste the access key from the previous section.
5. Enter the URL to the container. The URL format is as follows:

https://storage-account.blob.core.windows.net/container-name


Back Up Company

6. Click on Verify account to validate your account settings and connectivity to the container then click OK to continue. The backup performance will depend on your internet connection speed.

Now that you have a pretty good grasp on the configuration, you can begin taking advantage of Windows Azure as a secure, always available option for your Microsoft Dynamics GP data. The best part is, the data geo-redundantly stored (if this option was selected when creating the storage account) and you no longer need to rely on tapes being exposed to damage.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Selasa, 25 November 2014

Working with Dex.ini Settings to customize the Microsoft Dynamics GP Connect gadget

I take a pause in my Microsoft Dynamics GP 2015 Developer's preview series to bring something fun before the Thanksgiving holiday here in the United States. Hopefully you find this trick very cool and enjoy it in your workplace.


Have you ever wanted to wake up with The Dynamics GP Blogster page as the centerpiece of your Microsoft Dynamics GP application homepage? Or how about your favorite online news outlet? What if you just want to display your company web page or an intranet portal to allow employees to update their information or view the latest company news?

Today I will show you how to take advantage of two obscure Dex.ini settings to customize the Connect gadget.

The standard Connect gadget displays Microsoft Dynamics Community news and updates, but there are two Dex.ini keys used to enable runtime debugging of the Connect gadget. One of the Dex.ini keys turns on the debugging feature and the other allows you to specify a URL to be displayed. The keys are:

DebugConnect=TRUE
ConnectTestURL=http://dynamicsgpblogster.blogspot.com

If you add these two keys to your Dex.ini file and re-launch Microsoft Dynamics GP the result will jump right at you.

Customized Connect Gadget

I also noticed that if the customized URL contains videos, these will play fine within the Connect gadget. How about that for some educational YouTube videos from the Microsoft Dynamics Channel? I tested it in the Web Client and it also worked just fine.

Please send in your comments as I would like to hear how you plan to use these new settings. Also remember, if you are using the Support Debugging Tool, you can roll out the settings to every user without having to visit their workstations.



Take a look at the following related articles:

Working with the Dex.ini Settings in Microsoft Dynamics GP 2013
More DEX.INI Settings!

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Selasa, 19 Agustus 2014

Microsoft Dynamics GP 2013 R2 Installation: Utilities changes

When executing Dynamics Utilities for a brand new installation of Microsoft Dynamics GP 2013 R2 you may have noticed a new window in the guiding wizard. This window is the Web Client SQL Server Login window, which allows you to specify a common SQL account that will be created during the system database setup process.

Web Client SQL Server Login window

In GP 2013 R2, users accessing the web client exclusively no longer require a SQL account to access the underlying data in the system and company databases they have been assigned to. However, their Active Directory credentials must be associated to their Microsoft Dynamics GP account (stored in the Users Master table (SY01400). Access to data is afforded via a common SQL Server login once the Active Directory credentials and the Microsoft Dynamics GP user credentials have been validated. This provides users with a single sign-on experience from the web client.


User Setup

The above is described in more detail by Jason Lech, Escalation Engineer at Microsoft in his article on Identity Management.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.IntelligentPartnerships.com

Rabu, 06 Agustus 2014

Deploying Business Analyzer Companion App Services on Windows Azure Service Bus

Business Analyzer App for Windows 8.1

If you are not using Business Analyzer today, shame on you. Last year sometimes I wrote a small article on how to deploy the Business Analyzer Windows 8 application on a personal laptop, which is typically how most of us road warriors need it to be for demo purposes. However, here at Intelligent Partnerships, we've changed our approach a bit: all our infrastructure and demo environments now reside on Windows Azure, which gives all of our people the flexibility of having a single environment and consistent across the board, while allowing our accounting staff to do work from anywhere in the world.


Today, I want to talk about another one of those cool features in Windows Azure: The Azure Service Bus and how you can leverage it to run the Business Analyzer app for Windows 8.1.

I really don't like to oversimplify anything, but think of Azure Service Bus as cloud based message queuing system, akin to MSMQ, but running on a much more robust platform. The advantage is that applications are no longer bound by myriads of layers (like firewalls, complex authentication, etc.) to communicate with each other and can reside anywhere and on any device that can communicate to the Internet.

So let's get started...

1. To setup a Service Bus you sign into Azure's management portal, then click on the Service Bus option on the left navigation bar.

Service Bus service
2. Click the Create button to add a namespace for your service bus. The namespace identifies the service in Windows Azure and is assigned an address. You can then choose the region where your service will be hosted.

Service bus namespace

By clicking the Ok button, Windows Azure proceeds to activate that namespace if it's available. If it's not available, you will be prompted to enter a new namespace, before you can continue.

3. You can then proceed to install Business Analyzer Companion App Services on one of your virtual machines (preferably not your SQL Server). The installation is straight forward and all you need to do prior to running the setup executable program (setup.exe) is to install the reporting services configuration reports for Business Analyzer. Those are provided in the Companion App services SSRS zip file (MDGP2013_CompanionAppServices_SSRS.zip).

4. Once the Companion App Services application is installed, you can proceed to launch the configuration app, which can typically be found in the C:\Program Files\Microsoft Dynamics\GP Companion App Services\ folder.

Welcome screen
The Welcome screen displays the Companion App Service current connection information, which should later on be replaced by the settings you establish for this instance.

5. After the Welcome screen, you are presented with the Windows Azure configuration screen.

Windows Azure Service Bus Configuration window
In this window you will enter information about the Service Bus you previously configured using the Azure management portal. For the most part you specify the namespace, issuer, and issuer key which can be found


Service Bus connection information
Note the default issuer and default key must match the issuer name and issuer key, respectively, in the Azure configuration window. Click Next to continue - you will experience a short delay while the wizard validates the Azure service bus information you provided.

6. On the Host Configuration screen you can enter the host name and port of the machine that's going to be running the service - typically, just accept the default port. The beauty here is, since we already configured access via the Azure service bus, it's not necessary to expose the public name (server.cloudapp.net) of the host and create an end-point for the port, thus exposing our servers to the world - this is why we created the service bus to begin with!



7. Next on is to select the Companion Apps that will be used with the service. You will want to mark both of them here.

Select Applications

8. You will then want to choose the Data Connections to use with Companion App Services. In this case you have a choice of either Excel Reports or SQL Server Reporting Services reports.

Data Connections
9. Next you must identify where to find the Excel reports using UNC path to specify the folder. My reports happen to be at \\servername\gpfiles\excel reports\reports.

Shared Excel Reports folder

10. You are now asked to enter the address to Report Server and specify a folder where the reports can be found, if you happen to have multiple instances of GP deployed.


If you have deployed SharePoint Integrated mode, then click the checkmark and specify the library address for the reports.

11. Once the report server information is validated, you will receive a confirmation page with the address to be used when configuring the Business Analyzer application.

Configuration Complete window
The address we are particularly interested in is the Service Bus address, which in this case is simply ip-contoso. (with the period at the end).

12. Open the Business Analyzer application, the go to the Configuration window from the Charms on the right. You can then enter the ip.contoso. address in the service configuration.

Business Analyzer Configuration

Sweet! Now, we have configured BA without really exposing the public address of our Azure VM, which should make system administrators very happy.

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.IntelligentPartnerships.com

Senin, 04 Agustus 2014

Implementing a Windows Azure Site-To-Site VPN

Hi everyone! I'm back! The past few months have seen an increase in projects here at Intelligent Partnerships so I have been shouldering some very challenging projects involving some very complex integrations. Thank goodness for eOne Business Solutions' SmartConnect and SmartPost products which have made for some very happy customers and some extremely robust integrations. In addition, I've been working on quite a bit of customizations migration from Visual Basic for Applications (VBA) to some cool hybrid solutions using Microsoft Dexterity and Visual Studio Tools (VST) for Microsoft Dynamics GP. If you remember, I was one of the pioneers of the technique to replace VBA customizations for hybrid Modifier and Visual Studio Tools. You can read more about this technique in the articles:

Hybrid development for the Managed Code developer
Hybrid development for the Managed Code developer (cont.)


Well, today I wanted to talk about Microsoft Azure Virtual Networks and specifically, the steps needed to setup a Site-to-Site VPN between your Windows Azure virtual network and your Local Area Network.

As you may recall from previous articles I've written on the subject of deploying Microsoft Dynamics GP on Windows Azure, a pre-requisite step before provisioning the VMs that will host SQL Server and your Microsoft Dynamics GP application is to provision and configure a Virtual Network, to be used to communicate the VMs. Also, if you are not going to have your Azure virtual network talk to your on premise LAN, chances are you also need to provision a VM to run Active Directory Services and Domain Name System (DNS) for name resolution - I guess, the typical networking stuff.

As with everything else, life is never this ideal, and most organizations have an on premise AD DC and DNS already in place, so the question is "Why can't we simply use Azure as an extension of our network without having to provision these additional services?" The answer is, of course, you can!

To make the setup process happen smoothly, you must first have the following information at hand:

1. IP address and name of your DNS server
2. Internet facing address of your VPN server or appliance
3. Address space and subnet masks for your local area network (in layman's terms, the range of IPs covered by your TCP/IP network)
4. Optional: Address space you want to use to setup your Azure virtual network.
5. An AD account with privileges to join computers to the domain

To get started, logon to the Windows Azure management portal (http://manage.windowsazure.com). Once in the management portal follow these steps:

1. The first task at hand is to identify our on premise network. Click on the Network Services and Local Network to define your on premise network. Once on the page, click on Add a Local Network.


On premise Network (LAN) setup

2. For this example, we will call the network CONTOSO-ONPREM. You will be asked to enter the public IP address for the VPN. For this example, our CONTOSO-ONPREM network's can be reached at 200.100.50.1. Click the checkmark to proceed to the next screen.

LAN details

Note that this is simply an Azure identifier for your on premise network and not necessarily the actual physical name of it.

3. Now, you must define the range of valid IPs of your on premise LAN. Particularly important here is to know the starting IP address of the on premise network and the Classless Inter-Domain Routing (CIDR) method use for IP address allocation.

Address space

We will assume the CONTOSO-ONPREM routing prefix is 192.168.1.1 and that the usable address range is anywhere from 192.168.1.0 to 192.168.1.255 which gives us a subnet mask of 255.255.255.0 (or 24 "1" bits). Please consult with your on premise network administrator if unsure.

4. Once the on premise network has been defined, you can proceed to register the DNS server for by clicking on the DNS Servers option or clicking the +NEW action button on the lower left corner of the portal.

DNS Server registration

In our example, the CONTOSO-ONPREM DNS server can be found at 192.168.1.20. My preference is simply to assign the FQDN name of the DNS server, though, again, this is just used in Azure to identify the object and rather not necessarily related to the domain name of the machine.

5. Provision virtual network. For our example, we will call this network CONTOSO-AZURE.


CONTOSO-AZURE network provisioning
We can the click next to continue. In the next page of the network provisioning, you will be asked to identify the DNS server and establish the VPN connection to the on premise network.


Azure does a pretty cool job at showing a graphical representation of what you are configuring. In the next page, you can pretty much setup your address spaces and subnet masks. However you must add a subnet mask for your Azure gateway, by clicking the Add Subnet button.



For the purpose of our example, our Gateway IP address will be 10.32.0.0.

Click ok to continue.

6. Azure will now provision the network and make the setup based on the choices you selected. Once the network is provisioned, you can now go to the Dashboard and should see the following:


7. Next steps now involve setting up the VPN tunnel on your firewall to communicate to the Azure gateway.  For this you have a choice of downloading a number of ready to go VPN device scripts (supported devices include Cisco, Juniper, and software-based as Microsoft's). If you cannot find your specific device, it's always good to do a search over the Internet as someone has probably already figured out some configuration for the specific model you have. Important as well is to record the Azure network key, which you will need when setting your VPN.

Once you have established connectivity with your on premise VPN, you can begin provisioning your VMs, making sure you select your virtual network in the process.

Hopefully you found this article useful now that Azure is becoming more and more a choice for hosting Microsoft Dynamics GP.

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.IntelligentPartnerships.com

Senin, 19 Mei 2014

"Invalid Object Name ..SY01500" error after restoring GP 2013 company database in a different environment

Just recently I was working with a partner to determine the root cause of an issue that stemmed from restoring a company database from a customer's production environment, to the partner's development environment.

After restoring the database, we could see the following error messages attempting to access the database:

Invalid object name SY01500 error

smCleanupFilesBeforeLogin stored procedure error

Login failed error

Enabling a DEXSQL.LOG gave us more insight into the issue. We could see the following prepared statement being executed prior to the ODBC error message:

/*  Date: 05/18/2014  Time: 19:55:37
stmt(148745784):*/
BEGIN DECLARE @stored_proc_name char(34) DECLARE @retstat int DECLARE @param5 tinyint DECLARE @param6 smallint DECLARE @param7 tinyint DECLARE @param8 tinyint DECLARE @param9 tinyint DECLARE @param10 tinyint DECLARE @param11 tinyint DECLARE @param12 int set nocount on SELECT @param5 = 0 SELECT @stored_proc_name = 'ZBPI.dbo.smCleanupFilesBeforeLogin' EXEC @retstat = @stored_proc_name 5, 'sa', 'Company_Name', 0, @param5 OUT, @param6 OUT, @param7 OUT, @param8 OUT, @param9 OUT, @param10 OUT, @param11 OUT, @param12 OUT SELECT @retstat, @param5, @param6, @param7, @param8, @param9, @param10, @param11, @param12 set nocount on END
/*
/*  Date: 05/18/2014  Time: 19:55:37
SQLSTATE:(S0002) Native Err:(208) stmt(148745784):*/
[Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name 'DYNGP2013..SY01500'.*/
/*


The prepared statement calls the dbo.smCleanupFilesBeforeLoging stored procedure, which has (68) hardcoded references to the former system database in the old environment. A look at the SY00100 table, confirmed the backup had been taken from an environment with a different system database name.

We had to formulate a plan of attack to address the issue, so we decided for a two step approach which involves:

a) Updating the SY00100 table to reflect the current system database, and

b) Execute the Database Maintenance utility to rebuild all stored procedures and functions, triggers, and views for all products installed in the environment - more about Database Maintenance utility here. After all, they certainly would be other objects referencing the former system database.

This approach resolved the issue completely and the partner could now access the company database in their development environment without having to restore the customer's system database as well.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/