Adding an Attachment for a Catalog Item on the Service Portal

jscott
Kilo Contributor

I am creating an ATF test script for a Service Catalog item on the Service Portal. I have set the field values but before I can order the item, an attachment is required to be added to the catalog item request.

When I selected Add Attachments to Existing Record it says the specified record  must exist prior to this step running. If adding attachments to a form that has not been submitted yet, use "Add Attachments to Form" instead.

I tried using the Add Attachments to Form step. It says for this step you must have already opened a form using either the "Open a New Form" or "Open an Existing Record". I am not opening a new or existing form. My steps are as follow:

1. Impersonate a user

2. Open a Catalog Item(SP)

3. Set Variable Values (SP)

I need to add an attachment before the Order a Catalog Item (SP) step can run.The test will fail without the attachment. When I try to use the  Add Attachments to Form step I am able to select a file to attach but it does not allow me to add it to the step. If I click the checkbox next to the file name the 'Remove' button is activated. See attachment.

Thanks for any help that can be provided.

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

@jscott 

Please consider marking appropriate reply as Correct & Helpful to close the thread.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

 

Hope you're doing well! You've me helped a lot recently with all your posts! So wanted to say thanks!

I know that this option was not possible in NY release but do you know if there is a solution now or a way around this?

 

Thanks

Yes it works fine in the latest releases.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Actually, what I am trying to achieve is a little bit different if you can help.

I have a record producer which creates a record on the portal, once submitted I created a Copy widget, this widget is supposed to take all the variables and re-load the form  with these values to allow for resubmission. This works fine for the variables but it is also supposed to pick up all the attachments added to the original records and load them into this new form before submitting it so that the new record will contain all the information and attachments as the original.

For this, I am unable to duplicate the attachments and add them to the form. I tried to add the variable of type attachment but that only allows for 1 record to be uploaded per record.

Is there a way around or another solution

Hi Ankur, 

 

Which step should be used to add an attachment on record producer portal form using ATF?