Loading...

Thursday, July 21, 2011

Uploading WSP Package as Farm solution in CA with Powershell ISE

1)Open file
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Config\PowerShell\Registration\SharePoint.ps1. In windows Powershell ISE
and Execute

2)In new file
Add-SPSolution “D:\Deploy\MySharePointSolution.wsp“


Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp –GACDeployment
and  execute.

Check in Central Admin-->System Settings-->Manage Farm solution -->MySharePointSolution.wsp“ is deployed or not .
There is no UI way to upload and activate solution at farm level.









Tuesday, July 12, 2011

Comparing the old value and new value in Itemupdating Event

In Itemupdating event Of SPItemeventReceiver class

properties.ListItem["column name"]  gives the old value (b4 updating)
properties.AfterProperties["column_0x0200_name"]  gives the new value (after updating)

where column_0x0200_name is the internal name of column.

Saturday, July 9, 2011

Modal Popup with Content Editor Webpart

Open the sharepoint Site
In Ribbon,Find Insert Link-->Select Webparts-->In Media and Content Category-->Select Content Editor Webpart.-->Add/Edit the webpart

In SP 2010, Select Contents in CEWP, Format--> Html Source in the ribbon,
Add the javacript code
<script type="text/javascript">
     function OpenDialog(URL) {
         var NewPopUp = SP.UI.$create_DialogOptions();
         NewPopUp.url = URL;
         NewPopUp.width = 700;
         NewPopUp.height = 350;
         SP.UI.ModalDialog.showModalDialog(NewPopUp);
     }
 script>

"javascript:OpenDialog(‘../_layouts/MyAppPage/MyPage.aspx’)"--To Make it Server relative.
So that Dialog box opens anywhere in site collection