Unable to connect to the database SharePoint_Config on Server. Check the database connection information and make sure that the database server is running..


Hi,

While trying to open a SharePoint Site, we were getting the following error in the event log.

Unable to connect to the database SharePoint_Config on Server.  Check the database connection information and make sure that the database server is running..

The password of the  account that was specified within the Identity tab of App Pool of the site had changed.

Correcting it resolved the issue.

Bye..

Loading External JavaScript files


Suppose this is our external javascript file content.

(customscript.js)

It consist of a simple function

function SayHello()
{
    alert(‘Hello World’);

}


 

It is placed at the following path   ..\ISV\ExtJS. i.e. within ExtJS folder inside ISV.

Place the following code in the form load of an entity’s form.

var scriptElement=document.createElement("<script type=’text/javascript’>");

scriptElement.src="/isv/ExtJs/customscript.js";

document.getElementsByTagName("head")[0].insertAdjacentElement("beforeEnd",scriptElement);

SayHello();

At times, it would work properly however sometimes it would throw “Object expected” error. It is because browser load JavaScript files asynchronously. If the script isn’t loaded we would get the error.

So here we need to make use of onreadystatechange event.

So we would modify our script as following

 

var scriptElement=document.createElement("<script type=’text/javascript’>");

scriptElement.src="/isv/ExtJs/customscript.js";

scriptElement.attachEvent("onreadystatechange",loadScript);

document.getElementsByTagName("head")[0].insertAdjacentElement("beforeEnd",scriptElement);

function loadScript()

{

if(event.srcElement.readyState=="loaded" || event.srcElement.readState=="complete")

{

    SayHello();

}

}

 

 

Or we could also using XmlHttp request object to load the external file.

var url="/isv/ExtJs/customscript.js";

var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

xmlHttp.open("GET",url,false);

xmlHttp.send();

eval(xmlHttp.responseText);

SayHello();

 

Bye..

PreAuthenticate and UnsafeAuthenticatedConnectionSharing Property of CrmService


Hi,

While trying to understand the use of these properties, i found this wonderful article !

Speed Racer – Call CRM at speeds that would impress even Trixie!

https://community.dynamics.com/product/crm/crmtechnical/b/billoncrm/archive/2008/10/07/blog-move-58-speed-racer-call-crm-at-speeds-that-would-impress-even-trixie.aspx

Do check it out !

Bye..

Error parsing Solution. Value does not fall within the expected range.


Hi,

I started getting this error while deploying the site definition solution in SharePoint ( it was visual studio 2008) . I also had a web application in the same solution.

I removed that web application and then it got deployed without any error. However that web application was there earlier as well but it wasn’t giving error before. Not sure what exactly caused the error.

Anyways, I hope it would be useful !

Bye.

Get Value for Person or Group Column Type


To get the value for Person or Group Column Type after removing the special characters from it, use this function

private string  GetValue(SPListItem item, SPField gpField)
{
    string currentValue = item[gpField.Title].ToString();
    SPFieldLookup field = (SPFieldLookup)gpField;
    SPFieldLookupValue fieldValue = (SPFieldLookupValue)field.GetFieldValue(currentValue);
    return fieldValue.LookupValue;
}

to call it

string strName = GetValue(spListItem, spListItem.Fields["fieldName"]);

 

Bye..

A nice tool for working for CRM


Hi,

Check out this wonderful tool

CRM Configuration Manager

 

Bye..

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓