I'm having issues setting the default people picker value using CSR and JSLink. I've hardcoded values for now, which is displaying the correct value in the new form, but when I submit the form an error is displayed "The user does not exist or is not unique." If I select the user manually through the GUI, then it works fine. The goal is to default the user field in the new form to the current user.
Thanks in advance for the help,
Gunjan
"use strict"; // ********************************************************************************** // Custom Field Template // Field: User Field // ********************************************************************************** (function () { SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ Templates: { Fields: {"UserField": {"NewForm": setDefaultValue } } } }); })(); // ********************************************************************************** // Methods // ********************************************************************************** // function setDefaultValue(ctx) { //Set user default value ctx.CurrentFieldValue = [{ Description:"sp2013\administrator", DisplayText: "Administrator", EntityGroupName: "", EntityType: "", HierarchyIdentifier: null, IsResolved: true, Key: "1", MultipleMatches: [], ProviderDisplayName: "", ProviderName: "" }]; return SPClientPeoplePickerCSRTemplate(ctx); }