New answers tagged spfield
you can also do: SPFieldUserValue user = new SPFieldUserValue(Web, Web.CurrentUser.ID, Web.CurrentUser.LoginName); listItem["Author"] = user; listItem["Editor"] = user; listItem.Update(); web.Update(); SPFieldUserValue can be hard coded or as iv done getting the current user, web is the SPWeb object and listItem is the SPListItem object
You can use the SPBuiltInFieldId.Author: listItem[SPBuiltInFieldId.Author] = new SPFieldUserValue(web, userId, userName); listItem.SystemUpdate(false);
Once you have the ProfileBase object you can use the PublicUrl property to return the link to the user profile. You will have to handle the case where the user does not have a user profile. Another approach is to use REST or CSOM against the UserProfile GetPropertiesFor endpoint. http://msdn.microsoft.com/en-us/library/office/jj163800.aspx
You will need to use the 'Approval Status' field in conjunction with Version field in order to find what you are looking for. For example, an Approval Status of 'Draft' but with a version of 4.5 tells you that there is a published version available (4.0) but that the page is still being revised (Draft). If this is a new site then you especially want to be ...
Top 50 recent answers are included