About Me

My photo
Kottarakara, Kollam, Kerala, India
Though currently in Thiruvananthapuram, my residence is at Kollam district in Kerala which is almost 75 kms away from the office

I Me Myself !

Hi all, as a ASP.NET professional i would like to use this as a technological and informative site. Maybe, this contains my personal portfolio, funny matters, videos, photos too. Still i mainly intend to use this for official purpose.

Currently specialising in Microsoft's Dynamic CRM 4.0, am engaged in an assignment to successfully develop and deploy a CRM product as per the custom business logic. I am employed in a microsoft partnered switzerland based firm, know more...

The technologies/languages/packages i am confident in are:


  1. ASP.NET (vb/C#)

  2. C#.net

  3. vb.net

  4. sql server

  5. Adobe photoshop

  6. Macromedia Flash

  7. MS Dynamics CRM 4.0

My achievements includes:
1) Cisco Certified Network Associate (CCNA).
2) Active member of ASP.NET forum.
3) Active member of CRM Dynamics Community.

My professional career:


  • Web Designer at AUFIDUS INDESIGNS, Ernakulam, Kerala

  • Computer Lecturer at SRV Govt Higher Secondary School, Ernakulam, Kerala

  • Software Instructor at IGNOU, Ernakulam, Kerala

  • Lower Divison Clerk (LDC) at Melattur Grama Panchayat, Malappuram, Kerala

  • Software Trainer in .NET at Sun Infosys, Kottayam, Kerala

  • Software Trainer in .NET at NIIT, Adoor, Kerala

  • Computer Lecturer at UIT, Adoor, Kerala

  • Senior Systems Executive at PIT Solutions, Technopark, Thiruvananthapuram, Kerala

CRM 4.0 - Making & saving picklist values to CRM database dynamically

There is a common issue with picklist and CRM 4.0. If we add picklist items statically, while saving the values will be saved to CRM database properly. But while we add items dynamically it won't be saved with proper values but with NULL !!!

I have found a nice workaround for this issue as follows:

1) Instead of picklist type i declared the attribute as simple text
2) On the onLoad event i created a html select control dynamically and binded the values from CRM database.
3) i added this SELECT control to the innerHTML of our attribute
4) hide our CRM attribute (so now our CRM attribute is hidden and SELECT control is visible)
5) On onSave event i loop through the SELECT control and get the selected item
6) Set the selected item's value to the hidden CRM attribute
7) So while saving the correct selected value will be saved to database
SUCCESS

Limitations:

Can't declare the CRM attribute as business required
don't get any events like onChange for created SELECT control

Refered links are:

http://forums.microsoft.com/Dynamics/ShowPost.aspx?PostID=2839313&SiteID=27
http://www.stunnware.com/crm2/topic.aspx?id=JS1

CheckBox onChange() event in CRM 4.0

In CRM 4.0, the checkbox onChange doesn't work. it is the onClick() for checkbox that works. So we need to implement the onClick() event in the onLoad() event of the form. Sample code is as given below:

crmForm.all.new_check.onclick = function()
{
if ( crmForm.all.new_check.checked )
{
crmForm.all.new_from.style.display='none';
}
else
{
crmForm.all.new_from.style.display='inline';
}
}

CRM 4.0 look and feel customisation.

Dear All,

Here are some referral links to the below tasks:
1) Modifying the color of disabled form fields
2) Changing the color of a label
3) Removing a navigation bar entry at runtime
4) Setting the active tab
5) Hiding tabs at runtime
Code snippets available at : http://www.stunnware.com/crm2/topic.aspx?id=JS7

6) Setting the background color of a CRM form
7) and a lot more......
http://www.stunnware.com/crm2/topic.aspx?id=js13

Accessing CRM database via Javascript in CRM 4.0

To access the CRM database from JavaScript, use the following as a template:

var connection = new ActiveXObject("ADODB.Connection");
var connectionString = "Provider=SQLOLEDB;Server=STUNNWARECRM;Database=stunnware_mscrm;Integrated Security=sspi";

connection.Open(connectionString);

var query = "SELECT name FROM FilteredAccount";
var rs = new ActiveXObject("ADODB.Recordset");

rs.Open(query, connection, /*adOpenKeyset*/1, /*adLockPessimistic*/2);
rs.moveFirst();

var values = "";

while (!rs.eof) {
values += rs.Fields(0).Value.toString() + " ";
rs.moveNext();
}

connection.Close();

alert(values);

Cheers
Binukumar S

reference: http://www.stunnware.com/crm2/topic.aspx?id=JS7

Using Javascript with CRM 4.0 Referral links

Hi all,

As per my R&D for Javascript with CRM 4.0 i found some usefull links which i like to share with you all. They are:

http://ronaldlemmen.blogspot.com/search/label/javascript
: General !
http://www.stunnware.com/crm2/topic.aspx?id=JS4
: General !
http://blogs.msdn.com/jonasd/archive/2007/05/21/playing-around-with-iframes.aspx
: Playing around with iframes !
http://www.stunnware.com/crm2/topic.aspx?id=JS11
: Changing the default view of related entity !

Resizing Windows/Forms in CRM 4.0

If you have a lot of data on an entity form, then you sometimes do want to force the page to open in full screen mode. There's a small javascript which will allow you to do this. Just add these two lines of code to the form onload of your entity form:

window.moveTo(0,0);
window.resizeTo(screen.availWidth, screen.availHeight);

Also, when you open a custom page you can also set the window size by using the same javascript function. In your code you can use the following function in the Page.OnLoad() to set the window size to match your requirements:

private void SetWindowSize(int iWidth, int iHeight)
{
StringBuilder sbResizeScript = new StringBuilder();
sbResizeScript.Append("\n");
ClientScript.RegisterClientScriptBlock(this.GetType(), "ResizeScript", sbResizeScript.ToString());
}

Cheers
Binukumar S

source: http://ronaldlemmen.blogspot.com/search/label/javascript

Accessing webservices via Javascript in CRM 4.0

how to create a piece of javascript code which retrieves data from a webservice ? This information has been included in the CRM SDK and you'll be able to find it here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/CrmSdk3_0/htm/v3d0accessingwebservices.asp

Here's the code example of that page:

// Declare variables.
var i=0; var j=0; var k=0; var r=0;
var serverUrl = "http://www.webservicex.net";

// This is the picklist.
switch (parseInt(event.srcElement.DataValue, 10))
{
case 1:
i = "JPY";
break;
case 2:
i = "GBP";
break;
case 3:
i = "EUR";
break;
}

// Instantiate at connection to the Web service and call the get method.
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

xmlhttp.open("get", serverUrl + "/CurrencyConvertor.asmx/ConversionRate?FromCurrency=USD&ToCurrency="+escape(i), false);
xmlhttp.send();
var startTag = "";
var endTag = "
";
var exch;
var valueStart = 0;
var valueEnd = 0;

// Parse the returned XML string.
valueStart = xmlhttp.responseXML.xml.indexOf(startTag, valueEnd) + startTag.length;

valueEnd = xmlhttp.responseXml.xml.indexOf(endTag, valueEnd+1);
exch = xmlhttp.responseXML.xml.substring(valueStart, valueEnd);

// Set the Exchange rate on the custom attribute.
crmForm.all.fabrikam_exchangerate.DataValue = parseFloat (exch);
j = crmForm.all.totalamount.DataValue;
var kk = j*(parseFloat(exch));

// Calculate and set the total sum in the selected currency.
crmForm.all.fabrikam_totalcurrency.DataValue = kk;


Cheers
Binukumar S

reference: http://ronaldlemmen.blogspot.com/search/label/javascript

Making fields manadtory or required in runtime in CRM 4.0

Some times we need to modify the requirement level of attributes on the form at runtime. Use the below snippets then:

// Set field to not required
crmForm.SetFieldReqLevel("fieldname", 0);

// Set field to business required
crmForm.SetFieldReqLevel("fieldname", 1);

// Set field to business recommended
crmForm.SetFieldReqLevel("fieldname", 2);

// set the field required (i.e. show error message when field is not filled in)
crmForm.all.fieldname.req = 2;

// modify the label to be red
crmForm.all.fieldname_c.className = 'req';

Cheers
Binukumar S

reference: http://ronaldlemmen.blogspot.com/search/label/javascript

MS DYNAMICS CRM 4.0 Customisation

Its pretty easy to edit the sitemap for naigation purpose in Dynamics 4.0.
We can create new tabs, groups and navigation areas within the existing system itself by editing the sitemap.

If anybody needs help please mail me at binu.kumar@gmail.com