
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2020 02:14 AM
Hi Team,
This is related to ATF (Service catalog in service portal). I have a requirement to show a log message in an ATF test step. I am doing 'Record Query' on log table then adding 'Open an existing record' step,
Log message contains the RITM no. This is the key to fetch the log message.
But I am unable to get RITM no. in the test steps. When we order a catalog item then we are getting REQ no. Now to get RITM no, I added a test step 'Record Query' on sc_req_item table (filter i uses as - Request is output of Order a catalog item)
By doing this I am able to get the sys id of RITM But I want RITM no so that I will use this to fetch log message.
Please let me know if we can fetch RITM no or not
Regards,
Gaurav
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2020 03:22 AM
Hi Gaurav,
Here is the script. Please replace the SYS_ID of the test step accordingly:
(to get the sys_id open the Record Query on sc_req_item table test step, and copy sys_id from context menu like we do in normal forms.)
(function(outputs, steps, stepResult, assertEqual) {
// add test script here
var gr = new GlideRecord("sc_req_item");
gr.get(steps('**sys_id of TEST STEP that has the RITM sys_id').record_id);
outputs.table = 'sc_req_item';
outputs.record_id = gr.getValue('number');
stepResult.setOutputMessage(gr.getValue('number'));
})(outputs, steps, stepResult, assertEqual);
Thanks,
Debopriya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2020 05:48 AM
Hi, I was trying to fetch work notes which contains on RITM number and same I was trying to do on log table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2020 08:57 AM
Can I fetch any step's sys_id?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2023 11:24 PM - edited ‎10-25-2023 11:25 PM
Hi Debopriya,
I have submitted a form using ATF and the RITM got generated which I could see in Catalog request item tab related list. How Can I open the RITM record now through ATF?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2020 02:38 AM
Using GlideRecord in server side script you can fetch all the details. For e.g
var gr = new GlideRecord('<table>');
gr.get('<sysid>');
gr.ritm_no;
Regards
Deepen Shah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2021 03:10 PM
Hello Deepen,
How can I use it to get RITM number from sys_id from previous (record query) step and the sys_id is dynamic.
Thank you
Harshul