- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2023 12:47 AM
Can anyone help me @Vasantharajan N @Ankur Bawiskar
As I need to display change request number in ritm description filed once change request is created
Tried with Business Rule and the condition is when the change state is in New.
But not able to get the Change Request number.
Business Rule:
var chnGr_sysId = current.change_request.toString();
var riTs = new GlideRecord('sc_req_item');
riTs.addQuery('parent', chnGr_sysId);
riTs.addActiveQuery();
riTs.query();
if (riTs.next()) {
riTs.description = current.number.toString();
chGr.update();
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2023 03:41 AM
@Arjun Reddy Yer - Please try this code and let us know.
var chnGr_sysId = current.sys_id.toString();
var riTs = new GlideRecord('sc_req_item');
riTs.addQuery('parent', chnGr_sysId);
riTs.addActiveQuery();
riTs.query();
if (riTs.next()) {
riTs.description = current.number.toString();
riTs.setWorkflow(false);
riTs.update();
}
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2023 03:41 AM
@Arjun Reddy Yer - Please try this code and let us know.
var chnGr_sysId = current.sys_id.toString();
var riTs = new GlideRecord('sc_req_item');
riTs.addQuery('parent', chnGr_sysId);
riTs.addActiveQuery();
riTs.query();
if (riTs.next()) {
riTs.description = current.number.toString();
riTs.setWorkflow(false);
riTs.update();
}
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2023 03:51 AM - edited 05-16-2023 11:10 PM
still not working
is it possible via workflow? @Ankur Bawiskar @nayanawadhiya1
Workflow which is used for creation of Change Task and Catalog Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 11:42 PM - edited 05-16-2023 11:43 PM
Hello Arjun,
Is your RITM is still in Active true state after change creation?
If not then remove the rits.addActiveQuery() from the Business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2023 01:45 AM
Dear @Arjun Reddy Yer
Please try this, I tested and working.
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2023 01:47 AM
Dear @Arjun Reddy Yer
Please try this, I tested and working.
- Kailas
