Wednesday, November 30, 2011

Customize Context Sensitive Help on SharePoint 2010


SharePoint 2010 extended the context help experience to users and allows the developers easily creating and customizing the help topics for their products deployed on SharePoint. This post will focus on how to customize the SharePoint 2010 context help and make the context sensitive help worked on your pages.

Enable Custom Site Collection Help

On the Site Settings of the top level site in the site collection, activate the Site Collection Feature “Custom Site Collection Help”.






It will create a document library “Site Collection Help” for hosting the help content available for whole site collection.

Create Help Collection

Create a new Help Collection folder in “Site Collection Help” document library.





Specify the Name, Title, Locale ID, and Product Name. Locale ID specify the language that the Help collection is in (For example, 1033 means English). Product is the identifier of this help collection.




















Enable this Help Collection in Site Settings -> Site Collection Administration -> Help settings.




 












Create Help Categories and Add Help Topics

Help Category is a named folder you can put the help article (topic), it provides a way to group the help topics by subject and list with a table of contents. Help Topic is the actual HTML article created and uploaded by user, and associated with a context key which will be associated to the custom SharePoint web page to enable the context sensitive help.
























In this post, we will use the web page name as the Context Key, so the javascript in the masterpage could automatically find help topic by the page name. For example, if you have created a web part page called page1.aspx, you will have page1 as the Context Key here.

Modify Master Page to Enable the Context Sensitive Help in Help Button and by F1 Key


Add following javascript to your master page, it parses the current URL and gets the page name; set the context key and register the F1 key.

// get current page path and name
var currentUrl = window.location.pathname;

// if it is not a system page
if (currentUrl.indexOf('/_layouts') < 0) {

   // get the page name
  var d = currentUrl.lastIndexOf('.');
  var s = currentUrl.lastIndexOf('/') + 1;
  var sPage = currentUrl.substring(s, d);

   // remove space
  sPage = sPage.replace("%20", "");
  sPage = sPage.replace(" ", "");

   // set context sensitive key
  navBarHelpOverrideKey = "WSSEndUser_" + sPage;

   // set the F1 key
  WPSC.RegisterForEvent("urn:schemas-microsoft-com:dhtml", "onhelp", ShowHelp);
}

function ShowHelp() {
  HelpWindowKey(navBarHelpOverrideKey);
  return false;
}


After everything done, load your page, and click on the help button, or press F1 in the keyboard, you will see the help article in a popup window like:


Tuesday, May 31, 2011

SharePoint Content Orgainzer is not work for programmatically file uploads

Issue:

When programmatically uploading a file to Drop Off Library creating by Content Organizer feature, all pre-defined rules won't be automatically executed, and the document won't route to its destination right away even you have the proper rules set up. I thinks the only way to triggle the routing is by UI.

Workaround:

Reduce the interval of Content Organizer Processing timer job for the web application. By default the timer job is scheduled to run daily. You could reduce it to run in every minute.

Thursday, May 19, 2011

Tuesday, February 08, 2011

PPS Dashboard Designer cannot save data connections

We had problem on SharePoint 2010 PerformancePoint Service. When creating a new Data Connection from Dashboard Designer, we got error complained the document library location does not exist.

Eventually we found out we need to reset the permission of PerformancePoint service account to the we application if the web application service account is not the same one as the PerformancePoint Service application.

We executed powershell commands:

$a=get-spwebappliation -identity http://mywebapp
$a.grantaccesstoprocessidentity("domain\ppsServiceAccount")

Tuesday, January 25, 2011

MS Dynamics CRM 2011 On-Premise Installation


To install MS Dynamics CRM 2011 (RC version so far), you need to install to a clean Windows Server 2008 R2 x64 without existing Dynamics CRM install.


  
Create service accounts

 

Create following service accounts on Active Directory and enable the delegation for services.

  • CRM_App : Application Service account. CRM web application will run on it and connect user to CRM data.
  • CRM_WebService : It manages the deployment, such as create an organization or remove deployment administrator role from a user
  • CRM_Sandbox : It is used to create a isolated environment to run the custom code, such as plug-ins.
  • CRM_Async : It is used to process queued asynchronous events, such as bulk emails or data imports

 

To set the Service Principle Name on an Active Directory and enable the delegation to services (Kerberos), follow the steps below,

    1. Verify the CRM server name and FQDN, for instance, "CRM" is the server name and "crm.company.com" is the FQDN, and port 80 will be used for CRM web application. Create DNS entries if necessary.

     2. Login to domain controller as domain administrator.

     3. Execute following commands in command prompt:
      Setspn –A http/crm domain\crm_app

Setspn –A http/crm.company.com domain\crm_app

4. Open "Active Directory Users and Computers", select CRM_App and open the properties.
5. On Delegation tab, select "Trust this user for delegation to any service (Kerberos only)"



      6. Repeat step 3 to 5 for other service accounts.
      7. Login into CRM server and add all service accounts to local administrators group.

 

Install Dynamics CRM 2011 (RC)


  
Run CRM2011-Server-ENU-amd64.exe and extract file to a temp folder. Run setup.exe.

1. Select Get updates for Microsoft Dynamics CRM

2. Click Next


3. Enter the product key (RC key)


4. Click "I Accept"


5. Specify installation directory.


6. Select Server roles.


7. Specify database server name. Select "Create a new deployment" if you don't upgrade from an existing CRM instance.


8. Specify the OU from AD, the CRM groups will be automatically created under this OU. This OU has to be created on Active Directory before the installation.

9. Specify service accounts.


10. Select the IIS Web site if it is created already, if not, create a new one. If using port number other than 80, the Service Principle Name has to be explicitly created with this port number.


11. Specify email router server (I am leaving it blank)


12. Specify the Organization Settings


13. Specify the Reporting Service Server


14. Click "Next".


15. Click "Next"


16. Click "Next"


17. Click "Install"


18. Installation begins.


19. Installation finished.

Wednesday, January 19, 2011

"Unable to create report. Query produced too many results" error on PerformancePoint Service

"Unable to create report. Query produced too many results" error in PerformancePoint Service 2010 can be fixed by increasing the maxBytesPerRead setting on

c:\program files\microsoft office servers\14.0\WebServices\PpsMonitoringServer\web.config

Monday, January 03, 2011

Most of Windows services are not running on Windows 2008

Today I spent several hours to fix an issue on a Windows 2008 box. Most of windows services were not running except few. The server also hangs when shutdown. Eventually I found a KB help me solve the problem

http://support.microsoft.com/kb/2004121

Here are the steps I've done to solve the problem:

1. Create a Multi-string value: DependOnService on HKLM\SYSTEM\CurrentControlSet\Services\HTTP
2. Modify the Multi-string value data to CRYPTSVC and click OK.
3. Reboot the server

It seems this only happens on Windows 2008, Windows 2008 R2 is fine.