The CreatorCon Call for Content is officially open! Get started here.

Attachment in sc catalog item widget

hadarzec
Kilo Contributor

Hi:)

In the widget client script I see that attachment is saved in 'sp_portal', where does it change the location and add the attachment to the correct item?

this is the line:

var ah = $scope.attachmentHandler = new nowAttachmentHandler(setAttachments, function() {});

ah.setParams('sp_portal', $scope.data._attachmentGUID, 1024 * 1024 * 24);

5 REPLIES 5

Actually, I found another workaround, but I would still be interested in your solution Dominik.



I found this KB when looking around: ServiceNow KB: Service Portal - when processing record producer, attachments aren't yet available to...



So I used an Async insert BR on the sys_attachment table, so you can get the actual sys_id of the record, rather than the temporary sys_id for sp_portal.