Add uploaded file to hr case created through VA

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 11:20 AM
Hey there SN Comm Team!
I am stuck on trying to accomplish having the uploaded file from the end user, added to the hr case being created through VA Chatbot.
I have seen Virtual Agent User Input File Picker [Paris] from @Mark Roethof (thank you Mark). But unfortunately I am not getting it to work on my side (and the link provided for "Virtual agent script" that is suppose to mention a system property (as is mentioned in the post link above), just goes to a general page)). Does a system property "vaSystem.attachToRecord()" need to be created?
This is what I am working with -
I am using File picker input that looks like this:
Once the file is collected, the flow then goes through populating input fields and then creating the hr case. And then, adding the file to the record:
This request is going to a specific CoE which is the ER table. The script within my script action utility to add the file is as follows:
(function execute() {
vaSystem.attachToRecord(vaInputs.doc_attachment_added.getValue(), 'Employee Relations Case', vaInputs.create_sn_hr_er_case);
})()
The above script is my latest that I am trying. I have tried a few other ways to no avail. But, if someone can let me know how to correct this, that would be great!
Thank you!
-Rob