- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 01:47 AM
Hi,
I have a request table and request_item table. The request_item table is coming as a related list in the workspace. I want to create a related list action is the request_item table called upload and when i click on that it will basically redirect to a new form where the request number from the request table will get auto populated in the new form and there will be an attachment field which will need to be mandatory. Can somebody please provide the script to do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 07:51 AM
try this
function onClick() {
var url = 'https://emcitizendev.service-now.com/x/iem/tqa-workspace/record/x_iem_tqa_work_request/cf0f63f31b6f96103df95314604bcbb9/params/selected-tab-index/1/sub/record/x_iem_tqa_work_request_items/-1_uid_1/params/query/work_request_number%3Dcf0f63f31b6f96103df95314604bcbb9/extra-params/query%2Fwork_request_number%3Dcf0f63f31b6f96103df95314604bcbb9%2FparentTable%2Fx_iem_tqa_work_request%2FparentRecordSysId%2Fcf0f63f31b6f96103df95314604bcbb9';
open(url, '_blank');
}
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
02-18-2025 02:02 AM
you can have Related list type Declarative action on your RITM table.
What's your actual business requirement to create new RITM using the button?
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
02-18-2025 02:14 AM
Hi @Ankur Bawiskar ,
My requirement is to basically allow users to click on the related list actio which will redirect them to a new form and the request number will be autopopulated there . After that they will basically upload an excel in the new form and we will read the excel and create new records which i have already done. But i am not able to dynamically open the form from the related list action and populate it with the request number. Also all my tables are custom extended from task table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 02:15 AM
share the UI action configured currently along with screenshots
also did you check any OOB related list action?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 05:36 AM - edited 02-18-2025 05:42 AM
Hi @Ankur Bawiskar ,
I want to create the related list action in this work request item related list which will basically open a new form. Everything after that will be handled by a br which is done. So I want to know how to open a new form on the request item table and populate the request number from the request
This is the URL I want to redirect to but the sys id of the work request number should be dynamic here - /x/iem/tqa-workspace/record/x_iem_tqa_work_request/cf0f63f31b6f96103df95314604bcbb9/params/selected-tab-index/1/sub/record/x_iem_tqa_work_request_items/-1_uid_6/params/query/work_request_number%3Dcf0f63f31b6f96103df95314604bcbb9/extra-params/query%2Fwork_request_number%3Dcf0f63f31b6f96103df95314604bcbb9%2FparentTable%2Fx_iem_tqa_work_request%2FparentRecordSysId%2Fcf0f63f31b6f96103df95314604bcbb9