Skip to content

Commit b506db1

Browse files
authored
Create Client script.JS
1 parent e6e6419 commit b506db1

File tree

1 file changed

+12
-0
lines changed
  • Client-Side Components/Catalog Client Script/Document validation

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function onSubmit() {
2+
var ga = new GlideAjax('DocumentValidationHelper');
3+
ga.addParam('sysparm_name', 'validateAttachments');
4+
ga.addParam('sysparm_item_id', g_form.getUniqueValue());
5+
ga.getXMLAnswer(function(response) {
6+
if (response !== 'valid') {
7+
alert('Document validation failed: ' + response);
8+
return false;
9+
}
10+
});
11+
return true;
12+
}

0 commit comments

Comments
 (0)