How to add attachment to the catalog item variables using the ATF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 07:44 AM
Hi,
How to add a attachment to the Catalog item (to a variable) using the ATF. And i don't want to add it using the existing attachment in the sys_attachment table. Is there any way to do this ?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 11:15 PM
Hello @snow57,
Please refer to the below link:
https://www.servicenow.com/community/developer-forum/how-to-upload-files-into-catalog-item-variables...
If it is helpful, mark it as a thumbs-up!
Thanks & Regards,
Abbas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 01:25 AM
Hi @snow57
It can only be done by following ways:
1) Use the "Record Query" test steps. Table will be sys_attachment and add the attachment sys_id for query.
FYI: You have to take a sys_id from Attachment [sys_attachment] table. It cab be sample file's sys_id.
2) Open a catalog item.
3) Set the variable values and for attachment type variable use the same sys_id.
4) Add your next steps or submit form.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 12:50 AM
will try this way and i hope it should work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 12:57 AM
Hi Shaqeel & Abbas_5
Do this step would be applicable for server end ATF. Currently I have created atf for which run on server side and it was working but as soon as upgradation took place the attachment got erased from the atf due to which its failing. Currently I have only option is that to upload attachment in atf . But looking for permanent solution where after upgrade attachment should be at his place.