Thursday, December 8, 2011

REST: Post XML to Update List Item

I need to use vCenter orchestrator to update item in SharePoint list.

Using rest plugin, I post the following XML to SharePoint.

 


   
   http://172.20.34.33/_vti_bin/listdata.svc/Rest(4)
    1
    2011-11-07T17:39:56+08:00
    
      
    
    
      
        0x0100B0118C4AF8B98C408EDC3A87238E73F5
        4
        4
  haha
        Item
        /Lists/rest
      
    

Tuesday, December 6, 2011

HTML in Calculated Column

In a SharePoint list, it looks up a Hyperlink column in another list. After my investigation, Lookup column only supports Text column and Calculated column. 

I decide to use Calculated column and render its content as html. Based on below references link, I add a script file to a content editor. But, it still failed.


After some time, I modify the script file and it works file.

Sunday, December 4, 2011

SPFieldUrl: Open URL in a New Window

When I add a hyperlink column in a list and add an item, I click its hyperlink. Then, it redirects current page to the link. But, I want to open a new window when clicking these links.

In fact, I cannot configure it inside SharePoint. After Googling, I discover it can be done by the following steps:

1. Go to folder "Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\XSL"
2. Open fldtypes.xsl
3. Change line '<a href="{$url}" >' to '<a target="_blank" href="{$url}" >'
3. Save the file and restart IIS

After that, I create a new hyperlink column, it opens a new window when clicking its link.

RenderPattern Element (Field Types)
SharePoint: Creating Custom SharePoint 2010 Field Types
How to: Create a Custom Field Type
Customizing the Rendering of a Custom SPField
What's New: Custom Field Rendering Enhancements