
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 04:33 AM
Hi all,
i need to have somehow to get attachment.sys_id before catalog item is submitted. (so I can't use current.sys_id...)
The use case is as follows: check whether the file is in the correct format, size, etc.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 04:44 AM
And is this for just the Catalog Item with for example Catalog Client Script? Or about a custom widget to be set up?
If just Catalog Item AND Service Portal... you can't query the sys_attachment table for the correct attachment, because you don't know the sys_id of the sc_req_item (not yet created) or the cart (cart sys_id is added initially on the attachment).
For Platform UI this would be possible, though Service Portal 😞
Though maybe the variable type which I mentioned would do for you, if you are on Paris-release.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 04:40 AM
Hi there,
Is this for a Catalog Item on the Platform UI or Service Portal?
If you are on Paris, you could also have a look at variable type Attachment. This can be used with 2 attributes, to validates extension and size.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 04:42 AM
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 04:44 AM
And is this for just the Catalog Item with for example Catalog Client Script? Or about a custom widget to be set up?
If just Catalog Item AND Service Portal... you can't query the sys_attachment table for the correct attachment, because you don't know the sys_id of the sc_req_item (not yet created) or the cart (cart sys_id is added initially on the attachment).
For Platform UI this would be possible, though Service Portal 😞
Though maybe the variable type which I mentioned would do for you, if you are on Paris-release.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 04:54 AM
so I understand correclty that if I make new widget it's possible but if I need to use catalog client script it's not possible to get that sys_id?