“SQL Server timeout expired” in CRM


Hi,

I was occasionally getting this error while trying to open pages within CRM.

This post by helped me solve the issue

http://billoncrmtech.blogspot.com/2008/10/sql-timeouts-in-crm-generic-sql-error.html

Key to change (or add if not there) of type  DWORD

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\OLEDBTimeout

Bye..

Advertisements

“System.IO.FileLoadException: Access is denied” error while developing Callout


Hi,

I got this error while developing a post update callout for CRM 3.0.

The reason for this could be because the Network Service account under which CRM runs may not have appropriate rights for that.

One possible solution is to right click the assembly -> Properties –> Security tab –> Add Network Service account and give it appropriate rights.

That’s it..

Creating dependent picklist in CRM 4


Hi,

I never thought creating a dependent picklist in CRM 4.0 could be that easy.

Just download this tool

Microsoft Dynamics CRM Demonstration Tools (for Microsoft Dynamics CRM 4.0)

http://www.microsoft.com/downloads/details.aspx?FamilyID=634508DC-1762-40D6-B745-B3BDE05D7012&displaylang=en

After connecting, click on the Dependent Picklist on the left navigation bar,

Select an entity, and primary and related picklist,

Select an option in primary picklist and check the boxes for the related picklist options and click on map,

same way map other options as well.

Once done, click on get scripts button, we’ll get the onload and onchange code which we need to just copy paste in the form !

That’s it…

Reading querystring using javascript


Hi while searching for the same,

got the following javascript

q = location.search;

getParam = function(arg) {
if (q.indexOf(arg) >= 0) {
var pntr = q.indexOf(arg) + arg.length + 1;
if (q.indexOf(‘&’, pntr) >= 0) {
return q.substring(pntr, q.indexOf(‘&’, pntr));
} else {
return q.substring(pntr, q.length);
}
} else {
return null;
}
}

var objectId = getParam(‘oId’);

alert(objectId);

or better

function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split(“&”);
for (i=0;i<gy.length;i++) {
ft = gy[i].split(“=”);
if (ft[0] == ji) {
return ft[1];
}
}
}

var pId= querySt(“pId”);
alert(pId);

http://ilovethecode.com/Javascript/Javascript-Tutorials-How_To-Easy/Get_Query_String_Using_Javascript.shtml

Here oId is the query string parameter whose value we need.

This works even if there are multiple query string parameters !

Bye…

Nice post – Developing plug-in for CRM 4


Hi,

While browsing found this wonderful articl, do check it

http://blogs.msdn.com/crm/archive/2008/03/07/developing-plug-ins-for-crm-4-0.aspx

Bye..

Refreshing custom parent page from CRM’s page


Hi,

I am working on a development of a custom aspx page for CRM 4, which is making use of grid view to show all the open activities.

That page would be the home page of CRM. The page is deployed within the isv folder as recommended by microsoft and it is being referenced within CRM through site map ! 

<SubArea Id=nav_home ResourceId=Homepage_Home  

Title=Activities Overview Icon=/_imgs/area/18_home.gif”   Url=http://localhost:5555/ISV/BHC/G.aspx   

Client=Web   Description=Activities Overview   PassParams=1 ></SubArea>

i.e. just above the SubArea with Id=”nav_activities”

The reason why i haven’t given a relative url is that if we are giving a relative url over there, CRM would append the organization name in the url ! ( This is implemented using Virtual path provider )

So what is the issue with that ?

Well the issue is,  if custom pages are making use of web.config of it’s own, becuase of the org name getting appened, CRM would start looking into the web.config of the CRM itself  (i.e. within CRMWeb\web.config) instead of your custom application’s web.config. Well this happens for pages referenced using sitemap only, this doesn’t happen in case of isv.config or iframe !

Coming back to the page, within the grid view we had to show links to open the activitiy and on editing the activity and clicking on save in that activity form, we wanted our custom page to get refreshed!

( One important thing to remember over here is that the pages must be in the same domain, otherwise we would recieve premission denied error while trying to use window.opener() )

So once grid is databound using sqldatasource, to show the link, we can add a template field over there   

// ///////////
 window.attachEvent(“onunload”, RefreshCustomPage);   

function RefreshCustomPage() {

//window.opener.document.forms[0].submit();

window.opener.location.reload();

// ///////////
 
Bye….