Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Mandatory additional comments on CSM portal when approver rejects approval is not working

vstefanova
Tera Contributor

Hi all, 

The OOTB "CSM Approval Info" widget on the CSM Portal does not enforce a mandatory rejection reason when an approval is rejected. 

Could you please share how to fix it?


Thank you in advance,
Victoria 

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@vstefanova 

you can check this against any PDI which is on Zurich or any fresh instance and see if that's OOTB behavior.

💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

boteeuwen
Kilo Sage

Hi Victoria,

For the CSM Approval Info widget you’re using, the rejection reason is not currently enforced by the widget code. When the user clicks Reject, the client script inn the widget sends rejected directly to the server, and the server updates the sysapproval_approver record without checking for a reason first.

I’d recommend cloning the CSM Approval Info widget rather than changing the OOTB widget directly. In the cloned widget, add spModal to the client controller and intercept the rejected action. Show a prompt asking for the rejection reason and only continue when the user has entered a value.

Pass that value to the server as something like c.data.rejectionReason. Then, before gr.update(), check whether the action is rejected and save the reason to the comments field on the approval record.

This keeps the approval flow unchanged for Approve, while Reject requires a reason. I’d also test this in a sub production instance first and verify whether E Signatures are enabled, since the widget has separate handling for those actions.

If this helped, could you mark it as the solution or helpful?