How to add Button in RITM- in Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 10:55 AM
Hi ,
when i click a button "Cancelled RITM" then RITM was going to be cancelled .
Script:
var appr=new GlideRecord('sysapproval_approver');
appr.addQuery('sysapproval', current.sys_id);
appr.query();
while(appr.next())
{
appr.state='rejected';
appr.update();
}
current.state=4;
current.update();
Same actions should be from PORTAL & Create Button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 02:10 PM
Hi,
Problem is here,
with out clicked on Button automatically RITM is going to Cancelled when i opened RITM in Portal level
it should not be done like this , when i click on button in RITM then only RITM should be cancelled.
here i didn't clicked on Cancelled RITM button but it is automatically state changed to Closed Incomplete
Approvals was not rejected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 02:20 PM
That's because you should only execute the code IF the button is clicked. Take a look at the tutorial I sent you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 02:37 PM
ok