Andosi Blog - the Art of Great Design

Connecting to a Microsoft CRM 2013 Internet Facing Deployment with C#

 

Integrating and retrieving data from a Microsoft CRM 2013 instance is a common request, and I have found myself working on a number of these solutions lately. I encountered a recent example where a client was using an Internet Facing Deployment of CRM 2013.

In this case, I needed to connect to the Microsoft CRM 2013 server to retrieve data to be integrated into Dynamics GP.

Here is a quick sample of code you may use to connect to an internet facing deployment of Microsoft CRM 2013 using claims based authentication.


// Get the endpoint of the CRM organization service.
Uri organizationServiceUri = new Uri(@"CrmOrganizationServiceEndpointUri"); // In production code, abstract this to configuration.
 
// Get the service configuration.
IServiceConfiguration<IOrganizationService> serviceConfiguration = ServiceConfigurationFactory.CreateConfiguration<IOrganizationService>(organizationServiceUri);
 
// Set up the credentials.
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = "CrmUserName"; // In production code, abstract this to configuration.
clientCredentials.UserName.Password
Read more

Executing SQL Queries via SharePoint Web Services

Can you really execute native SQL Queries from SharePoint Web Services?

Microsoft SharePoint is great for building enterprise systems tying together various data sources.  If the information you are looking for is in a SharePoint List or Document Library, it is straightforward to call the built-in Web Services to query or manipulate that data.  Through custom Web Parts, you can run server-side code and easily retrieve data that lives outside SharePoint.

Read more

Capturing (and using) raw SOAP messages in WCF

WCF is great for building web services.  It's also great for interacting with existing web services.  Visual Studio makes it so easy . . . add a service reference, point to the WSDL of the service and just like that, you have a set of classes to handle the service and data contracts.
Unfortunately, sometimes web services don't live up to their contracts.  Recently, I was interacting with a web service and found that sometimes the response would be null.  I fired up Fiddler and looked at the SOAP messages.  Sure enough, an error had occurred on the remote server and the response, while valid XML, looked nothing like the promised Data Contract.  It did however provide a useful description of the error.
There was no SOAP fault . . . no exception thrown (unless I tried to use the null response without checking), just a null response object by

Read more

CSS Consolidator jiu-jitsu

CSS Consolidator

Sometimes you inherit a huge pile of CSS and want to make a few changes. Sometimes there are huge groups of duplicated rules. Sometimes, you just want to see everywhere Comic Sans is used in your stylesheets. (Hopefully, nowhere.)
Paste in your Source CSS below and click Consolidate CSS.  Rules and selectors will be consolidated in the next textbox.  All processing is done client-side in JavaScript.
Below that, you will see a breakdown of your styles, arranged by Selector, Attribute and Values.
Why did I do this?  Why not?

Source CSS (No @media tags please)

Consolidated CSS

SelectorsAttributesValues

This blog has been relocated from http://mbsguru.blogspot.com/ with authorization.

Create a Vendor in Dynamics GP 2010 with eConnect using In Memory Serialization

Developing several integrations between Microsoft Dynamics GP 2010 and various third-party systems the last few weeks reminded me to update my previous article on In Memory Serialization for eConnect 10.
Microsoft Dynamics GP 2010 uses eConnect version 11 which includes significant updates. Notably, the COM+ component has been changed to a WCF service.
In this example, I am creating a new vendor record in Dynamics GP using the same in memory serialization technique. Why write a file to disk unnecessarily?
To run the following code on your machine:

  1. Install the latest version of the eConnect 11 SDK.
  2. Create a new Console Application in Microsoft Visual Studio.
Add references to these dynamic link libraries which are located by default in C:\Program Files (x86)\Microsoft Dynamics\eConnect 11.0\API\. (Ignore the x86 if you are using a 32-bit system.)
  1. Microsoft.Dynamics.GP.eConnect.dll
  2. Microsoft.Dynamics.GP.eConnect.Serialization.dll
Replace the Program.cs class in the project for the new class below.

using System;
Read more

Dynamics GP ActiveX component can't create object run-time error 429

Recently I was asked to look into an error a client was receiving while standing up a new Citrix server installation for their Dynamics GP 9 clients:
 

NOTE: If you are recieving this error while attempting to upgrade from Dynamics GP 9 to Dynamics GP 10, see this article.
 
When we hit the debug button to look at the underlying VBA code, we saw this line:
 

Based on the line of VBA code above, I knew that a connection to a database was needed, and the RetrieveGlobals9.dll was not installed on the new Citrix server. You might see slightly different code in your VBA, but the important part was that it was trying to call CreateObject on RetreiveGlobals9.
 
The first step to solve this problem was to download a copy of RetrieveGlobals9.dll from Partner Source at this URL.
Contact your partner to download this
Read more

Record Lock Trace v 2.0

I've updated the Lock Trace Utility for Dynamics GP with 2 new features.
The first enhancement will replace the standard "This batch is being edited by another user" prompt when attempting to post or delete a SOP Batch with the name of the user that has the batch locked with an activity record in SY00800.

 
The second enhancement will clear all records that are locked by users that are not actively logged in to GP.  This will be executed when attempting to access a transaction locked by a user that is not actively logged in.  After, the record will be available and the following prompt will be presented.
 
 
The basic delete statements executed by this feature are listed below:
 
 
delete tempdb.dbo.dex_lock where session_id not in (select SQLSESID from dynamics.dbo.activity)
delete tempdb.dbo.dex_session where session_id not in (select SQLSESID from dynamics.dbo.activity)
delete DYNAMICS.dbo.SY00800 where userid not
Read more

Resolving "Error occurred in deployment step 'Activate Features': Invalid file name"

The other day I was working on a SharePoint project that required the deployment of a Content Type, a List Template, a couple of List Instances and a couple of Feature Receivers. Things were coming along well until I started to reorganize the project. I dragged the List Instances into the List Template folder and renamed several folders to better represent their purposes. When I went to deploy, I got the error: "Error occurred in deployment step 'Activate Features': Invalid file name".

 
I looked around the .spdata files, checked the Feature file and double-checked them all again. Everything looked right. The ULS Logger wasn't much help but it did give me the actual exception: "Exception: Microsoft.SharePoint.SPException: Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file"
Read more

Dynamics World List of Influential People

I'm not really sure how, and no I did not nominate myself, but I made it into the top 260 nominees for Dynamics World's Microsoft Dynamics Most Influential People.  Thanks to who ever did nominate me.  You can view the list of nominees here.

Several of my old friends are on the list; Mark Polino, Ross Carlson, Dwight Specht, Troy Ensor, Bob McAdam, and Shane Hall to a name a few.  Plus some of my new friends like Mariano and Dave Musgrave will surely be moving up the list this year.  People like Andy Hafer really deserve the recognition for their contributions to the community as do all of the Dynamics MVPs that we all hear from so often.  Many of those who run the popular VAR and ISV organizations are on the list as well.

You can vote for those that you think deserve recognition for their contributions

Read more

GP Password Expired mid-day... while I was posting a Batch

I was recently talking shop with another consultant that has a customer who's Dynamics GP password was valid when they logged in but expired after causing a batch posting interruption.  Has this ever happened to you?

He submitted a support request to Microsoft to explain this issue and seek out a resolution.  The response he received was:

As for ways to overcome the password becoming invalid mid-day, there are two options:

1. Keep the password synchronized (time-wise) with the windows password and use the windows password reminder as a GP password reminder
2. Use the GP Password Expiration Notification utility, freely available from the blog link below

http://mbsguru.blogspot.com/p/dynamics-gp-password-expiration-notice.html

Microsoft recommended the GP Password Expiration Notification utility with qualification, of course, that it is not something Microsoft created or provides support for.  Even so, it's nice to see that this utility is serving the community well by helping to solve and prevent common

Read more

Dynamics GP 2010 R2 Feature List

Straight out of Tech Conference in Fargo this week, thanks to Dave Musgrave http://blogs.msdn.com/b/developingfordynamicsgp/archive/2011/03/04/microsoft-dynamics-gp-technical-conference-2011-day-1-morning.aspx, I came across this graphic that lists some of the exciting new features coming out with Dynamics GP 2010 R2:

 
Dave goes on to explain that not only is Dynamics GP not being laid to rest as some have speculated since Microsoft begin investing in Dynamics AX nearly a decade ago but rather in a future release they are planning to include a web based client for Dynamics GP.  That's a great improvement that I think we can all look forward to but first let's look at what's coming now:
 
  • Field Service Series customers should be looking forward to some of the FSS enhancements on deck:
    • The Contract Line Hold feature is well overdue.  I've had several clients that need this functionality.
    • Tech Stock Replenishment will be a much welcomed addition.  I'm actively working
Read more

Love, Hate and the ViewState

I was recently tasked with creating a SharePoint interface to Microsoft Dynamics GP Item Maintenance. As the client's business had grown, inconsistencies in theirItem Master became apparent. When new items were needed, a similar existing item was copied and the details updated to match the new item. If there were no similar items, a new item was created.
The problem was, many of the existing items were not properly categorized. There were people in the organization who knew bits of information about items, but nobody had all the information to correctly set up an item. Setting up an item properly required a combination of phone calls, emails and a little bit of luck. It could sometimes take weeks to get the item set up. This held up BOMs, Routings and pretty much everything else dependent on the new item.
As usual for a new project, we started with a discovery phase.

Read more

Microsoft Dynamics ERP Push to the Cloud

The Software Advice Blog has a interview clip up with Guy Weismantel, Microsoft's Director of ERP Marketing, in which he discusses their strategy for moving Dynamics ERP to the cloud.

He makes a good point; many ERP components are already delivered as cloud based services and we continue to move in that direction.  A complete, cloud based ERP won't be suitable for every Dynamics ERP customer but will prove to be a very good for many.

Check out the clip at http://www.softwareadvice.com/articles/enterprise/can-microsoft-dynamics-erp-make-it-to-the-cloud-microsoft-executive-interview-1022211/.

This blog has been relocated from http://mbsguru.blogspot.com/ with authorization.

Register Now to Save - Convergence 2011 in Atlanta!

The Early Registration Deadline for Convergence 2011 expires on February 21 and hotels are filling up.  That's just 5 days away!

Register now at http://www.microsoft.com/dynamics/convergence/atlanta11/registration.aspx to save $300 off the regular price that kicks in on the 21st.

Register 3+ people and receive another $100 off for the the 3rd + Attendee.  Straight Arrow took advantage of this one with many of us invading Atlanta this year.  Hope to see you there!

This blog has been relocated from http://mbsguru.blogspot.com/ with authorization.

Updated: Lock Trace Utility for Dynamics GP - PO Support

I received a request to extend the Lock Trace functionality to support locked Purchase Orders.  It was a very simple change so I went ahead and implemented that functionality.  You can download this new version here if you're interested in knowing who has a Purchase Order locked when you attempt to access it.

I started working on another feature for this utility but didn't want to hold back this new feature while working on that.  I created a product page here where I'll document release notes as this utility evolves.

Keep the feedback coming.  I have several other ideas for this utility and would like to hear yours.

This blog has been relocated from http://mbsguru.blogspot.com/ with authorization.

Record Lock Trace Addon for Dynamics GP

Natively, Dynamics GP doesn't always do a good job of enabling users to resolve common issues on their own.  A classic example of this is the prompt displayed when attempting to access a record that is locked by another user.  By default, as a user you are presented with the very generic message:
 
 
This is the message presented when attempting to access a document that is locked by another user in Sales Transaction Entry.  Now, you can download the free Record Lock Tracing addon for Dynamics GP (Tested on v10 and GP2010) that will replace this generic message with a message that includes the specific user that has the record locked:
 
 
This has already solved some headaches for some of my clients eliminating the need to contact their internal IT department in order to determine which user has a record locked.  This is particularly useful during periods with
Read more

Creating Customer Invoices using Sql Server Reporting Services 2008 R2

Recently I was tasked with creating a customer facing invoice using Sql Server Reporting Services 2008 R2. This particular client had employed a technique using Page Headers and Footers that didn't upgrade properly once they moved to hosting their reports in SharePoint 2010 Integrated mode.

 
Because Page Headers and Page Footers are not allowed to have references to data fields, the main issue was with how to consistently place a totals section in a fixed position at the bottom of the page without using a Page Footer.
 
Making the task even more difficult was the fact that this report should generate all customer invoices at once. Page numbering had to be based on the individual invoice, not the total pages in the "report". Although SSRS 2008 R2 has introduced a new method to reset page numbers on a group, explained by Chris Hays here, I choose to
Read more

Dynamics GP Custom Links - Shipment Tracking

I was recently reminded how useful Custom Links are in Dynamics GP.  This feature is very powerful for streamlining your processes but often goes underutilized.
You can access the Custom Link Setup window in the Company section of the Administration page in Dynamics GP 2010 or at Tools>>Setup>>Company>>Custom Link.  Here is a quick example of how you might leverage Custom Links to streamline your processes in Dynamics GP to drill back directly to shipment tracking information from Sales User-Defined Field Entry:
To setup this up for Federal Express, add a new Custom Link for your FedEx Shipping Method as follows:

 
You could setup a Tracking Number Custom Link for all Shipping Methods but each carrier has a unique page for tracking shipments.  After setting up the Custom Link, in Sales User-Defined Field Entry, for documents with the Shipping Method for which you setup the Custom Link assigned; when clicking
Read more


  • This email address is being protected from spambots. You need JavaScript enabled to view it.
  • (813) 792-1939
  • Privacy Policy