Approval field not being set as "requested" when manually approvals are created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello experts,
I am having one scenario where I'm using the approval field on demand form which is off course a task table field
when approvals are requested via flow/workflow this field correctly gets set to either requested/rejected/approved etc etc
but when users are creating the approvals mannually(ad hoc), then this field does not reflect correct status at all
why is this happening?
is there any OOB BR or process that sets the approval field to respected value?
if not then how can I solution this requirment, I know I can create a BR but is there any alterative available OOB(workflow activity wont help as we are using the flow and these approvals are being created manually)
I will appreciate any helpful info
Thank you!
Gaurav Vaze
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
what do you mean by manually created approval records?
share some details.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Sure @Ankur Bawiskar
Users are using edit button to add the user whom approval should go to from the approval related tab
and then use the Request Approval button
it has following code:
current.state="requested";
current.update();
new ApprovalUserFeedback().requested(current);this sets the state as requested for the added approval
This is how they are creating manual approvals as of now
What do you think about this, Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
yes it seems OOTB behavior as that code is not updating the parent task record for which approval is requested.
You can enhance that to update the approval field on the parent record.
But when you set approval using flow or workflow system takes care of updating the approval field on Demand or other task based record.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
53m ago
Will creating a BR be good?
because I see even when I update the approval records to approved/rejected then also the approval field is not updated
meaning updating the UI action alone will only work when the approval is created not when the approval is approved or rejected right?
I wil have to create a server side script that will update the states apon approval, rejection etc
