Tuesday, February 26, 2013

Create cab files later convert it to WSP


In SharePoint when you create a Site Template and later need to modify some fields or elements, you first convert the Site Template WSP to a CAB file. Then extract the cab file and modify the content. 

Now, after making the changes you again need to re-pack. For this purpose 'CabPack' utility is handful.

This is specially important to fix "Document Information Panel" failed to load in office documents in a document library after site created using a custom site template. The fix to this problem is, check and assign proper "Source ID' for each column the library schema file.
Reference to this issue:
http://social.technet.microsoft.com/Forums/nl/sharepoint2010setup/thread/289b1499-f02d-4942-b047-6fd069d2eaf6

Cab Pack utility:

Send email with line break in body

Sending email using java script from SharePoint can be tricky sometimes. Using built-in SharePoint function 'escapeproperly' can be usefull here.

function SendEmail() 

{
  var data = "FIRST LINE" + "\n" + "SECOND LINE" + "\n" + "THIRD LINE";
  window.location = 'mailto:?body='+ escapeProperly(data);
}

</script>