Issue
I am getting response like Created date and modified date but created by and modified by is missing.
this.http.get(this.baseurl + "_api/web/lists/getByTitle('mylist')/items?$select ID,Created,CreatedBy,Modified,ModifiedBy", { headers: { Accept: 'application/json;odata=verbose' } });
My sharepoint list also contains same column name like ID,Created,CreatedBy,Modified,ModifiedBy without any space.
Solution
According to my research and testing, the created by field is Author, modified by is Editor, You can use the following code to get created by and modified by:
_api/web/lists/getByTitle('xxxx')/items?$select=ID,Created,Modified,Editor/Title,Author/Title&$expand=Editor/Id,Author/Id
Answered By - Zella_msft
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.