How to create cancel button in RITM form in ITIL view and also How to create cancel button in RITM form in Service Portal and that condition to be met is when approval will approve the RITM then cancel button should not be there.

Sravani Gorle
Kilo Contributor
can anyone explain it in detailed way
1 ACCEPTED SOLUTION

Hi,

here you are not setting the approval value properly

jr.setValue('approval', 'requested');

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

16 REPLIES 16

manjusha
Kilo Guru

hi,

you have to create ui action which will be available on both side as in backend and on portal view 

in the condition of ui action check state.

for example like state!='approved'

check in your catlog item what is state value when catalog item is approved

Mark this answer as correct if helps.

Thanks,

Manjusha Bangale

Thank you , but I didn't get can you please explain briefly?

 

hi,

on sc_req_item table create ui action as button.

in the condition add below code

current.state!='approved'

so just check this ui action on portal

is this visible or not before adding above code in condition of ui action

Thanks,

Manjusha

Ankur Bawiskar
Tera Patron
Tera Patron

@Sravani Gorle 

please refer below steps

1) create server side UI action on sc_req_item table

2) condition as below

current.approval != 'approved'

3) In order to show that only for itil view you can go to the related list of UI Action and include the itil view

Refer images below for help:

Script: user your choice value here for cancelled state

cancelRITM();

function cancelRITM(){
	current.state = '5'; // give here the choice value for cancelled
	current.update();
}

UI Action Related List: include this only for ITIL view

https://docs.servicenow.com/bundle/helsinki-platform-administration/page/administer/list-administrat...

find_real_file.png

find_real_file.png

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader