hclleapforum

Open full view…

Send a file to other form trough service

technologirl
Thu, 26 Sep 2019 15:57:54 GMT

I'm trying to send one file to the form -of the same application- but the service fails every time, is this the correct approach?

marty_lechleider
Fri, 27 Sep 2019 13:28:31 GMT

You can not send a file attachment from one form to another via a service. You can however send a link to the file or associate the file with a new record/form. The way file attachments work in Leap is that they are stored in Leap's content service and referenced by a record form. They do not actually get stored in the submission record. The submission record keeps track of the id and filename in the attachment field of the submission record. You can get the id and name (stored as an object) and send them to the values another form and then set an attachment field with the values. You can read more about the file attachment API here http://leap.hcldoc.com/help/topic/LEAPv9/LEAP/ref_data_rest_api_retrieve_attachment.html And how to use the BOA.getValue() and BOA.setValue(value) with attachments here: http://leap.hcldoc.com/help/topic/LEAPv9/LEAP/ref_jsapi_ref_data_objects.html