How to popup UI page in Related List's Approver tab's list view while Rejecting the approval?

Virendra K
Kilo Sage

Hi All,

 

I need to popup message using UI page or any other way (if it is there) with "Rejection Comments" text box where approver can mention the rejection reason. 

I have created the UI page and get populated on separate tab but its not working on list view.

How I could populate UI page when approver is selection Reject option from the dropdown ?

what about "Prompt" function option for message? is it feasible to use ? Can use it in BR , Listview ?

 

 

@nagaraju snow6

 

Regards,

VIrendra  

3 REPLIES 3

Sohail Khilji
Kilo Patron
Kilo Patron

Rater UI page , you can simply use the below script in UI Action to make the field mandatroy on approval rejection. Refer the below script logic which must help to build your logic in a simple way without over customization.

 

Use below script.

 

function information(){

g_form.setValue('state','13');

if (g_form.getValue('comments') == '') {

g_form.setMandatory('comments', true);

g_form.showFieldMsg('comments','Reason is required when rejecting a Change','error');

return false;

}

gsftSubmit(null, g_form.getFormElement(), 'reject_approval'); //MUST call the 'Action name' set in this UI Action

}

if (typeof window == 'undefined')

serverReject();

function serverReject(){

current.state = 'rejected';

current.update();

}

 

☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Thanks @Sohail Khilji  for you reply.

My requirement is, to get populate textbox to enter the "Rejection Reason", later need to catch it on Comments. 

I have designed UI page and its getting populate when Approval is opened on separate browser, but not working/ getting populated if I try to select "Reject" value from the dropdown list of "listview" of "Approval tab. 

Which option do I need to select on UI Action to implement this ? if u could provide the screen shot can help me ?

 

Regards,

Virendra
 

Subasree Kumara
Tera Contributor

@Virendra K were you able to get the solution for this?