How can I show a custom name instead of the client id when creating and editing files in…
Rate quality
Private research annotation
Sign in to add a private research label or note.
Jump to turn (9)
- 1How can I show a custom name instead of the client id when creating and editing
- 2How can I keep the APP as the uploaded file Author/creator but show the activity
- 3How can I stop it from changing the modified/editor name of all previous uploade
- 4SystemUpdate wont accept true or false
- 5Is there any way to update the activity log of the a specific file without chang
- 6How do I create a separate column in the SharePoint library to store the custom
- 7Can ownership of a file be given to an existing user in SharePoint via the code?
- 8Is that code C#
- 9Does each version of a file keeps its own Description in the Description column?
- User
How can I show a custom name instead of the client id when creating and editing files in SharePoint via an app using the code below?
uploadFile.ListItemAllFields["Author"] = context.Web.EnsureUser(clientId); uploadFile.ListItemAllFields["Editor"] = context.Web.EnsureUser(clientId); uploadFile.ListItemAllFields.Update(); context.ExecuteQuery();
- Assistant
You can use the
Web.GetUserByIdmethod to retrieve the user object for the client ID, and then set theTitleproperty of the user object to the custom name you want to display. Here is an example of how you could update the code you provided to use a custom name:code
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.