REQ and RITM status
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2020 08:20 AM
As I submit the request REQXXXXX is created with Approval and request state field which is in APPROVED state
RITMXXXX is created in Requested Item.
Requirement-User want as the REQ is created Approval field should be 'Requested' and Request state should be 'Pending Approval'.If user Approve the RITM,Approval=Approved and Request State=Approved.If user reject,Approval=Rejected and Request state=closed Rejected.
Is it even possible?
What is the best way to do that and how?
- Labels:
-
Request Management
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2020 03:52 AM
If you want when RITM will be approved, the status of REQ change accordingly, it should not be in the Approved state.
Please write the business rule on ritm,so that when ritm state is changed->req stste is also changed accordingly.
var gr=new GlideRecord('sc_request');
gr.addQuery('number',current.request);//here we are searching REQ record which have number same as entered in RITM
gr.query();
if(gr.next())//If found
{
gr.approval=current.approval;//setting RITM approval to REQ approval value.
}
If you feel, my answer helped you, then please mark my answer correct and helpful.
If you want more help .please keep us posted to help you.
Regards
Yash Agrawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2020 04:50 AM
Did it worked on your instance?It didn't worked for my instance.
There is out of box functionality already one BR executing for sc_request table named 'set request state'.