Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Add uploaded file to hr case created through VA

Rob Sestito
Mega Sage

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:

RobSestito_0-1699902709249.png

 

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:

RobSestito_1-1699902775680.png

 

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

0 REPLIES 0