Product Update
Require a Minimum Number of Attachments
Xurrent UI extensions now provide the ability to determine the number of files that are attached to aΒ record before this record is saved. This can be accomplished with the following JavaScript in aΒ UIΒ extension:
ITRP.field(βattachmentβ).size()
The JavaScript example below prevents someone in Xurrent Self Service from submitting a request without adding at least 3 attachments:
$(β#saveβ).on(βclickβ, function(e) {
Β Β if (ITRP.field(βattachmentβ).size() < 3) {
Β Β Β Β // at least 3 attachments
Β Β Β Β e.stopImmediatePropagation();
Β Β Β Β // prevents save action
Β Β Β Β // do something, show alert or error message
Β Β }
});