Skip to content

Commit cdd271d

Browse files
authored
Create client script.JS
1 parent 11739fa commit cdd271d

File tree

1 file changed

+13
-0
lines changed
  • Client-Side Components/Catalog Client Script/Multi-User Collaboration

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function onSubmit() {
2+
var collaborators = g_form.getValue('collaborators'); // Multi-user reference field
3+
if (collaborators) {
4+
var ga = new GlideAjax('CollaboratorHandler');
5+
ga.addParam('sysparm_name', 'addCollaborators');
6+
ga.addParam('sysparm_request_id', g_form.getUniqueValue());
7+
ga.addParam('sysparm_users', collaborators);
8+
ga.getXMLAnswer(function(response) {
9+
alert('Collaborators added: ' + response);
10+
});
11+
}
12+
return true;
13+
}

0 commit comments

Comments
 (0)