Create a new list Item in SharePoint 2010 with PowerShell

בהמשך לpost הקודם - Create List and Field in SharePoint 2010 with PowerShell, הפעם אדגים איך להוסיף לרשימה Item חדש.


כל מה שנצטרך זה ליצור פריט, להוסיף את השדות הרלוונטיים ולעדכן.


$newItem = $MyList.Items.Add();
$newItem["Title"] ="Test"; 
$newItem["TextField"] ="Bla Bla bla"; 
$newItem.Update(); # You can write $newItem.SystemUpdate(); 
 
הרבה יותר מהיר מכתיבת קוד .Net רגיל.

Comments

Popular posts from this blog

A sharepoint list view of the current month

SharePoint Service Provisioning - the service stuck on starting

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters