Pass person field using spjs.utility.addItem
- This topic has 2 replies, 2 voices, and was last updated 5 years, 2 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Home › Forums › SPJS-Utility › Pass person field using spjs.utility.addItem
I am trying to create a new item in a list and pass a value in a ‘person’ field (SPFieldUser is the Field Type) during new item creation (the person field is already filled-in in the current item):
spjs.utility.addItem({
'listName' : _spPageContextInfo.pageListId,
'data' : {
'Title' : 'newItemTitle',
'personFieldFIN' : getFieldValue('personFieldFIN')
}
})
I’ve tried a few things, but have not been able to get this working. What should be put as the data for the person field?
nevermind, found the answer here:
https://spjsblog.com/forums/topic/create-field-with-people-picker-data/
I’m glad you figured it out.
Alexander