We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Making a Downloadable Attachment in an Order Guide

jmiskey
Kilo Sage

Hello.  We currently have many similar Catalog Items that use shared Variable Sets.  Many of these Catalog Items have files that the user needs to download, fill-out, and re-attach to the Catalog Item. 

 

We do this by attaching the required files to be downloaded to each of the Catalog Items (different Catalog Items have different forms to download).  We then use a "Custom with Label" variable in one of the shared Variable Sets to create the file download link in the Catalog Item.  We have created a Custom Widget, which looks like this:

jmiskey_0-1784214702279.png

 

jmiskey_2-1784214750423.png

 

This works perfectly in standalone Catalog Items (we have been using it for years).  However, if we move these Catalog Items into an Order Guide, it no longer works.  My "Download Link" does not display, so they cannot click or download anything.

 

Here is how it looks (from ESC) in a standalone Catalog Item:

jmiskey_3-1784215089176.png

 

And here is how it looks when that same Catalog Item is in an Order Guide:

jmiskey_4-1784215156739.png

 

You can see the link is missing.  I need to figure out how to make this work in an Order Guide, and I need the solution to be dynamic (not hard-code in the attachment id), as the Variable is found in a Variable Set shared by many of these Catalog Items (the file to download is attached directly to the Catalog Item).

 

Does anyone have any good solution to this, whether it is updating what I currently have, or trying an entirely different method?

 

Thanks

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@jmiskey 

strange, it's the same catalog item and variable

So it should work in order guide

it worked for me in order guide and it showed the widget with button

AnkurBawiskar_0-1784218443390.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Ankur Bawiskar
Tera Patron

@jmiskey 

I think the reason it's not working in order guide is it's not getting the catalog item sysid and hence GlideRecord is not finding the record

why not hard-code the sysid of catalog item and then it will work in order guide?

hard-code it and then query table_sys_id

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Because, as I mentioned, the variable is found in a Variable Set that is shared among many Catalog Items (34 to be exact!).  So hard-coding it in the variable is really not a good option.