info messages not showing using upload button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 05:04 AM - edited 03-03-2025 05:05 AM
Hi,
I want to create a task in my custom table which is extended from the task table. Now there are 2 ways to create task one using the OOB new button in the table and another using an custom upload related list button(in another custom table) that I have created. Now I am observing something strange. When I click on new or the upload it is basically opening the same URL which is expected but when I try to have an info message or error message it is only showing for the record that was opened using the New button and not showing for the task record that I created using the Upload button. I tried to create a simple before insert/update br with no condition and just a demo info message and it is showing for the new button task and not for the upload button task. I need the users to see popup info and error messages in both cases
The code that I had written for upload related list button -
function onClick() {
var a = top.location.href;
var str = a.split('x_iem_tqa_work_request/');
var index1 = a.indexOf("x_iem_tqa_work_request/");
index1 = index1 + 23;
var substr = a.substr(index1, 32);
var num = g_form.getValue('work_request_number');
var instanceName = g_form.getValue('instance_name');
var url = instanceName + '/x/iem/tqa-workspace/record/x_iem_tqa_work_request/' + substr + '/params/selected-tab-index/5/sub/record/x_iem_tqa_work_request_task/-1_uid_5/params/query/work_request%3D' + substr + '/extra-params/query%2Fwork_request%3D' + substr + '%2FparentTable%2Fx_iem_tqa_work_request%2FparentRecordSysId%2F' + substr;
var win = top.window.open(url, '_self');
win.focus();
}
The URL when new task is created using New button - x/iem/tqa-workspace/record/x_iem_tqa_work_request/cf0f63f31b6f96103df95314604bcbb9/params/selected-tab-index/5/sub/record/x_iem_tqa_work_request_task/-1_uid_10/params/query/work_request%3Dcf0f63f31b6f96103df95314604bcbb9/extra-params/query%2Fwork_request%3Dcf0f63f31b6f96103df95314604bcbb9%2FparentTable%2Fx_iem_tqa_work_request%2FparentRecordSysId%2Fcf0f63f31b6f96103df95314604bcbb9
The URL when new task is created using upload button - x/iem/tqa-workspace/record/x_iem_tqa_work_request/cf0f63f31b6f96103df95314604bcbb9/params/selected-tab-index/5/sub/record/x_iem_tqa_work_request_task/-1_uid_12/params/query/work_request%3Dcf0f63f31b6f96103df95314604bcbb9/extra-params/query%2Fwork_request%3Dcf0f63f31b6f96103df95314604bcbb9%2FparentTable%2Fx_iem_tqa_work_request%2FparentRecordSysId%2Fcf0f63f31b6f96103df95314604bcbb9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 05:10 AM
that upload button is related list button?
where are you writing that info message?
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