Have to view Excel document in next tab instead of downloading in incident form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2025 10:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2025 11:03 PM
Out of the box it opens up the record which is being referred there.
What's the business requirement to have list field referring to sys_attachment?
Since you are referring to sys_attachment and hence it's showing that Open Record.
What's the business use-case to allow downloading?
you will have to use UI macro and add that on that field using field attributes
This will involve lot of customizations.
Why not show the users related list of Sys attachment and when they click on it, it will download the file?
TNT: "Related Attachments" Related List
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2025 02:39 AM
Did my above post answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2025 11:34 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2025 02:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2025 06:57 AM
(function process( /*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
// implement resource here
try {
var r = new sn_ws.RESTMessageV2();
r.setHttpMethod("post");
r.setEndpoint("https://hiltondev.service-now.com/oauth_token.do");
// Set headers
r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
// Prepare body
var payload = "grant_type=password" +
"&client_id=" + encodeURIComponent(gs.getProperty("Refresh_Token_Client_ID"))+
"&client_secret=" + encodeURIComponent(gs.getProperty("Refresh_Token_Client_Secret")) +
"&username=" + encodeURIComponent(gs.getProperty("Refresh_Token_Client_User_Name")) +
"&password=" + encodeURIComponent(gs.getProperty("Refresh_Token_Client_User_Password"));
r.setRequestBody(payload);
var res = r.execute();
var responseBody = res.getBody();
var httpStatus = res.getStatusCode();
response.setStatus(httpStatus);
response.setHeader("Content-Type", "application/json");
response.setBody({
status: httpStatus === 200 ? "success" : "failed",
http_status: httpStatus,
body: JSON.parse(responseBody)
});
a
} catch (ex) {
gs.error("OAuth Token Error: " + ex.message);
response.setStatus(500);
response.setHeader("Content-Type", "application/json");
response.setBody({
status: "failure",
error: ex.message
});
}
})(request, response); fix the code