From feddbeeb8afad3f89bad10554b8fe858b07267eb Mon Sep 17 00:00:00 2001 From: Abhishek Thakur <146176327+at8807602@users.noreply.github.com> Date: Thu, 2 Oct 2025 13:06:36 +0530 Subject: [PATCH 1/2] Create Get Number & Short Description.js --- .../Get Number & Short Description.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Specialized Areas/ATF Steps/Custom Test Step/Get Number & Short Description.js diff --git a/Specialized Areas/ATF Steps/Custom Test Step/Get Number & Short Description.js b/Specialized Areas/ATF Steps/Custom Test Step/Get Number & Short Description.js new file mode 100644 index 0000000000..ba5fd3c8fc --- /dev/null +++ b/Specialized Areas/ATF Steps/Custom Test Step/Get Number & Short Description.js @@ -0,0 +1,18 @@ +(function executeStep(inputs, outputs, stepResult, timeout) { + + var recordSysId = inputs.u_sys_id; + + var finance = new GlideRecord("incident"); + finance.addQuery("sys_id", recordSysId); + finance.query(); + if (finance.next()) { + outputs.u_number = finance.getDisplayValue("number"); + outputs.u_short_description= finance.getDisplayValue("short_description"); + stepResult.setOutputMessage('Found the record'); + stepResult.setSuccess(); + } else { + stepResult.setOutputMessage('Record not found'); + stepResult.setFailed(); + } + +}(inputs, outputs, stepResult, timeout)); From 71ab939e98bc687c68a51f41fed398eeac6ba41f Mon Sep 17 00:00:00 2001 From: Abhishek Thakur <146176327+at8807602@users.noreply.github.com> Date: Thu, 2 Oct 2025 13:07:13 +0530 Subject: [PATCH 2/2] Create Readme.md --- Specialized Areas/ATF Steps/Custom Test Step/Readme.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Specialized Areas/ATF Steps/Custom Test Step/Readme.md diff --git a/Specialized Areas/ATF Steps/Custom Test Step/Readme.md b/Specialized Areas/ATF Steps/Custom Test Step/Readme.md new file mode 100644 index 0000000000..3354b074ba --- /dev/null +++ b/Specialized Areas/ATF Steps/Custom Test Step/Readme.md @@ -0,0 +1,3 @@ +Above custom test step configuration script will help to get the "Number" & "Short Description" based on the sys_id of the incident. Let's say while performing any server dependent steps on incident table this custom step configuration script can be very usefullt to retrieve the details, not only about incident or number, short_description. Anybody can utilize this script to create custom step configuration script on different usecases o scenario. + +Note: You need to define the inputs & outputs for this, in my case I have defined the 'sys_id' as an input and "Number" & "Short Description" as an output to store the values and use it anywhere. Also to make sure you define the "stepResult.setOutputMessage("Successfull")" and "stepResult.setOutputMessage("Unsuccessfull")"