Approval field not updated on request cancellation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 08:55 AM
Hey all,
We are starting to run reports on requests that have been cancelled, but noticed an issue on the OOB cancel request UI action.
When you cancel the request, the workflow is cancelled, the RITMs are cancelled, task as well, however, even tho the request state is "closed cancelled', the request.approval field is still set to "requested". I have tried to update the UI action that sets the request_state, but am unable to update the approval field to a custom value of "cancelled" as well.
Is there an ACL or rule somewhere that prevents me from setting that field to "cancelled?"
I can change the active state and pretty much everything else on cancellation, however, just not that field.
Any thoughts?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 02:50 PM
Hey Wade,
Can I see the script that you're using to set the request.approval field?
I'm wondering if the issue is simply that you are setting the request.approval field to a value that does not exist for that field. Right click the 'Approval' field on the Request form and click 'Configure Choices'.
*Note: You can go to 'Show Choice List' to see all of the choice list values related to 'approval', although they all won't be used for the sc_request.approval field.
You'll see the choice values for the field.
Unfortunately the value 'cancelled' is not a value for sc_request.approval. The 'cancelled' value that you probably see in the dictionary refers to a different table called Group Approval.
Regardless, the OOB behavior of the 'Cancel Request' UI Action leaving the sc_request.approval value as 'Requested' is justified since the field right under it 'Request state' says 'Closed Cancelled'.
Solution:
But If you really want to set your approval field value to 'Cancelled', then simply add it in the Configure Choice page. It would just be for show though.
After you create your new choice field called 'Cancelled', right click the Approval field, go to 'Show Choice List' make sure to set the value to 'cancelled' and label as 'Cancelled' as shown below.
Then your UI Action script can simply be:
current.request_state = 'closed_cancelled';
current.stage = 'closed_complete';
current.approval = 'cancelled';
current.update();
Let me know if that works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2017 06:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2017 06:59 AM