New answers tagged


You could update the link url when DOM loaded. For example: <script src=""></script> <script type="text/javascript"> function GetCurrentUser() { var userid = _spPageContextInfo.userId; var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/...


Instead of passing only User IDs in TeamMembers, try passing the User ID as well as User Login name separated ;# (And multiple users separated by ;) like below: var userField = this.user1.get_id() + ";#" + this.user1.get_loginName()+";"+this.user2.get_id() + ";#" + this.user2.get_loginName(); // and so on... listItem.set_item('TeamMembers', userField); ...


Thanks to the comment by @Ganesh Sanap, I changed the data passed into the user field as below: TeamMembers now has a value in the format ";#" + this.user1.get_id() + ";#" + this.user1.get_loginName() + ";" + this.user2.get_id() + ";#" + this.user2.get_loginName(). With the latest format, I am able to successfully save all the usernames into the list.


No, this is impossible. JSOM can only be available in classic experience. Modern Script Editor has limited functionality.

Top 50 recent answers are included