Monthly Archives: July 2009

Highlighting the left menu of the current SharePoint page

I have discovered that it is in fact quite simple and effective: function highlightCurrentMenu() { var As = document.getElementsByTagName(“A”); for (var i=0; i if (As[i].className == “zz2_QuickLaunchMenu_1 ms-navitem zz2_QuickLaunchMenu_5”) { if (As[i].href == document.location) { As[i].style.fontWeight = “bold”; As[i].parentNode.style.backgroundColor = “#dddddd”; break; } } }}

Read More

Problem with tracking contact using CRM Outlook client

The errorAfter clicking the “Track in CRM” button to synchronize a contact to CRM from Outlook, the following error came up: …cannot link this item to Microsoft Dynamics CRM. Synchronization with this record or activity type has been turned off. How to fix it Select the “CRM” menu Select “Options…” Select the “Synchronization” tab Make […]

Read More

Get people picker value using Javascript

Usage: The following javascript will return the current name value of a specific people picker on a SharePoint form pageParameter: People picker number, which is the order of the people picker on the page.Returns: Name of the person or group, not the internal domain name. function getPickerInputElement(pickerNo) { var result = “”; var j = […]

Read More

Query SQL server from command line

Ever need to query SQL database from command line to export the result to a CSV file? I have used “sqlcmd” to do the job. The following is an example for that: sqlcmd -S [server name] -d [database name] -i [SQL file name] -o [CSV file name] -s”,” -w 300 The command explains There are […]

Read More

SharePoint custom list form catchya’s

Some catchya’s I have encountered while developing custom list forms using SharePoint Designer: Javascript does not work SharePoint designer added {generate-id()} automatically. Remove them all. Assigning value to hidden drop down list does not work, check the values that you are assigning is a valid value to the drop down. Otherwise, the assignment will become […]

Read More