- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 01:18 PM
HI,
I have a business rule in place on sc_task table and now I want to send the RITM Number that is present in TASK.
Currently i am using current.request_item.getDisplayValue(); But its not sending the RITM numebr instead its sending the TASK number.
Can anyone please help me.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 01:21 PM
Hello,
You need to do GlideRecord on sc_req_item table to get the RITM #. sample code like below should help you.
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.request_item);
gr.query();
if(gr.next())
{
current.u_request_number = gr.number;
}
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 01:39 PM
if you are looking to get the RITM number then gr.number should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 01:39 PM
HI
thanks Its working As expected

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 01:25 PM
Hello Ursnani,
Can you try using this current.request_item.number; or current.request_item.number.getDisplayValue();
~Raghu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 01:41 PM
Hello Ursnani,
I did the same thing and it works for me:
gs.addInfoMessage("The RITM number is:" +current.request_item.getDisplayValue());
Here is the BR and the Information on the SC_TASK:
Can you check on sc_req_item dictionary entries and verify which field has "Display = True"?
That might be one of the reasons for this issue.
Thanks,
Abhishek
If this reply assisted you, please consider marking it Correct, Helpful, or Like it.
This helps other customers to learn from your thread.