New answers tagged

0

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


0

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); ...


0

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.


1

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


Top 50 recent answers are included