Fetch RITM number using ATF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 05:39 AM
Hi All,
This is related to ATF.
I have submitted the form after making some changes using ATF. RITM got generated. How to get the RITM number ?
How to write an ATF step to fetch that RITM number ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 06:01 AM
Hi @admin11345_ ,
Please refer the below link.
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);
Please mark it helpful if it helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 04:22 AM
Hi @admin11345_
You need to go step by step:
1. Open new Req form.
2. Enter the fields value.
3. Submit
4. Open the Req record submitted. (Open existing record)
5. Apply filter to the list (Select list type as related list and add condition)
6. Open existing record>>step 5
YOUR RITM WILL GET OPEN.
You can use Record Query step too.
set the table to requested item
apply filter condition as created as today.
RITM is ......
or short discription is ......
and open using open existing record step.
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 04:23 AM
what's the next step after getting the RITM number?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 06:42 AM
step 1):- I have submitted a employee form
step 2):- As a result of it, RITM record gets generated in one of the related list tab.I need to validate whether RITM is getting generated or not.
step 3):- If generated, fetch the RITM number.
step 4):- open that RITM record.
I have submitted the form. But I need steps for remaining steps through ATF.