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.

How to add an attachment on the service portal via ATF

Jayalakshmi
Tera Contributor

I am trying to submit a catalogue form via ATF in which attachment is mandatory. I have added a test step 'Add attachment to Form (sp)' however its failing with comments 'User does not have permission to attach to record 'Catalogue Management' on table 'sc_cat_item' '.

 

I tried providing different roles but it still failing. Is there any specific role to be assigned to user to allow attachment on form in portal ?

 

I also tried 'Solved: Re: How to upload files into Catalog item variable... - ServiceNow Community' but it didnt work. Any input on this would be helpful.

 

Jayalakshmi_0-1697721229365.png

 

2 REPLIES 2

Shaqeel
Mega Sage
Mega Sage

Hi @Jayalakshmi 

 

Unfortunately, we do not have an ATF test step that could fulfill the requirement - Attach a file to the catalog item.

However when using the test step "Add Attachments to Form (SP)" - there is a chance of a successfully completed test step to attach to the catalog item on the service portal page. Whether this is successful or not depends on the customizations on the page.

 

KB Article: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0952775

 

 

Kindly mark solution/helpful 🙂 

Regards

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel

Ananta1
Tera Expert

Hi @Jayalakshmi , 

 

At present ATF doesn't support adding attachment in SP catalog. I think there is an idea in consideration for quite some time on that.

One work around would be to write a script or even use OOB record update step to disable the client script which makes it mandatory as a beginning step on the test. That way you can rest of the the things on the flow except that attachment mandatory client script.

 

Thanks,

Ananta