Thursday, January 12, 2017

Get LookUp and Author Name Using REST API + SharePoint 2013

How to get Author/Title or Name from AuthorID = dataResults.Title

function getUser(id, tdHtml){

var returnValue;
 jQuery.ajax({
  url: "https://YourSite/_api/Web/GetUserById(" + id + ")",
  type: "GET",
  headers: { "Accept": "application/json;odata=verbose" },
  success: function(data) {
         var dataResults = data.d;
      alert(dataResults.Title);
   
  }
});
}

How to get Author/Title or Name from AuthorID in one single Rest call / query


/_api/web/lists/getbytitle('KhaitanDocLib')/items?$select=Author/Title,PracticeArea/Title&$expand=Author/Id,PracticeArea


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 ...