When i started working with sharepoint event receiver, i have a requirement to update the sharepoint list’s author and editor value. I have tried googling but I’m not able to find good resource on this. So i have decided to share the code snippet to update the author and editor using sharepoint object model.
If you want to update the list’s field value without updating the the created by and modified by user and date you can use the below code.
SPListItem item = list.Items.Add();
item[“Title”] = “Something”;
If you want to update the created by and modified by user then you can use item.Update() method, It will update the created and modified user with current login user.
If you want to know more about Update and system update you can check my post https://cmsstores.com/microsoft-sharepoint-systemupdate-and-update-using-object-model/
Enjoy coding 🙂
- Microsoft Sharepoint SystemUpdate and Update using object model
- Sharepoint OM, getting email ID from login user name
- SharePoint Developer Interview Questions and Answers
- Client Object Model and Linq to Sharepoint implementation
- More about SharePoint Custom page and Application Page
- List enhancements in SharePoint 2010
- Creating the custom theme in MOSS Branding
- SSRS Sharepoint Integrated mode – adding CSV pipe export option
- Microsoft Sharepoint persisting webpart property values
- Sharepoint 2010 features