Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SharePoint check in SPListItem

In sharepoint how can you check in an SPListItem?

like image 444
Rupert Avatar asked Dec 10 '22 19:12

Rupert


1 Answers

See on MSDN: SPListItem.File.CheckIn();

For example:

SPFile file = item.File;
if (file.CheckOutStatus != SPFile.SPCheckOutStatus.None)
{
    file.CheckIn("Reason for check in.", SPCheckinType.MajorCheckIn);
}

The optional second parameter allows specification of either minor, major or overwrite check in via the SPCheckinType enumeration.

like image 162
Alex Angas Avatar answered Dec 24 '22 19:12

Alex Angas