- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2023 03:51 AM
How to add a default attachment to an attachment variable in a catalog item so that the user can download that attachment and add the updated attachment to that variable.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2023 04:21 AM
Hi @sreeshsurendran ,
You can achieve this using the following steps:
Step 1 : Attach the attachment to the catalog item, which you want to show up as default, example:
Step 2 : Navigate to the 'sys_attachment' table, you'll notice that a new record has been created - copy the 'sys_id' of this record.
Step 3: Create a onLoad catalog client script
function onLoad() {
g_form.setValue('attachment','b3db64fa97aea91082f2bb5ef053afb9'); // replace the sys_id with the one which you've copied in step 2
}
Result:
If my answer has helped with your question, please mark it as correct and helpful
Thanks,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2023 10:08 AM
@Slava Savitsky - thanks for the feedback, that's a good catch
@sreeshsurendran - as a workaround for this, you can add your template in the description of the catalog item
Click on the link icon and then select the link list as your attachment
Change the title and text accodingly.
This method wont delete the attachment.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2023 10:00 PM
@Karan Chhabra6 @Slava Savitsky - Thank you for the support 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2023 10:08 AM
Will the attachment then be available on the RITM?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2023 06:11 AM
Hi @Karan Chhabra6 , thanks for the solution. It's working as expected 🙂