It is fairly easy to launch an external application from within MS CRM and pass parameters, But sometimes you might need to do it the other way.

I recently had to pass a parameter to an MS CRM form from an external application. I found a way in which you can enable MS CRM 4.0 URL Query string Parameter by making a change to your registry setting on the blog below.

http://blogs.msdn.com/rextang/archive/2008/09/24/8962549.aspx

Once you’ve passed a parameter to your MS CRM form the next step would be to parse the URL to get the parameter. I wrote the code below to get the parameter. I’ve posted it on my blog because others might find it useful.

var varParameter = GetQueryString(“parameterNAME”);

if(varParameter != null)
{
if (varParameter.length > 0)
{
//DO SOME THING HERE.
}
}

function GetQueryString(paramName)
{
queryString = window.location.search.substring(1);
params = queryString.split(“&”);
for (i=0;i

Advertisements