Monday, August 5, 2019

Get the mail address from a FieldUserValue OR CreatedBy OR Author in CSOM

Code to get user Email from SharePoint ListItem - Created By


 //var Author = fieldVals["Author"];


FieldUserValue Author = (FieldUserValue)item["Author"];var user = postPageCtx.Web.EnsureUser(Author.LookupValue);
// load the data with the context             
postPageCtx.Load(user);
postPageCtx.ExecuteQuery();
var createdBy = user.Email;



Reference Links:

Get the mail address from a FieldUserValue Client Side vs Server Side

http://crawlspaceofprogramming.blogspot.com/2015/08/get-mail-address-from-fielduservalue.html?_sm_au_=iVVVTVW7sq4PQnWM


USING Powershell

https://www.sharepointdiary.com/2016/05/powershell-to-get-created-by-user-field-values-in-sharepoint.html




No comments:

Update or edit status filed in JIRA issue

the status field is a special case and can't be updated directly, which is the second problem here. Changing a status in Jira is called ...