How to make a UI Action cancel a request?

LMR
Mega Expert

I have a UI Action on the Catalog Task [sc_task] table that is supposed to...

On the Catalog task: Sets the State to Closed Cancelled, sets the Active field to false, populates Work Notes with Additional Comments to "Request Cancelled", kills the Active workflow and its contexts, does the previously listed things for all successor Catalog Tasks.

On the RITM: Sets the State to Closed Cancelled, sets the Stage to Request Cancelled, sets the Active field to false, populates Work Notes with Additional Comments to "Request Cancelled", kills the Active workflow and its contexts

What I Observe:

Nothing happens on the RITM level.

Everything on the Catalog Task works except the workflow isn't cancelled and the successor tasks are generating.

find_real_file.png

UI Action Form:

find_real_file.png

UI Action Script:

find_real_file.png

find_real_file.png

9 REPLIES 9

One quick question. Is this UI Action on the RITM form or the Catalog Task form? Not that it matters, but I am curious.


I am having a slight issue... the 2nd task generated State is changed to Rejected instead of Closed Cancelled which in turn is not letting me close the RITM. Also the Work Notes and Additional Comments were only populated on the 1st task


find_real_file.pngfind_real_file.png


In regards to "One quick question. Is this UI Action on the RITM form or the Catalog Task form? Not that it matters, but I am curious." -- my tested script is on Catalog Task.



Before proceeding further, I would like to know these:


- why would you need to close the RITM from the TASK level?
- what if there are multiple TASKs under a single RITM? and those TASKs are assigned to different teams and are in process of actioning them?


This UI Action is being made for a Fulfiller to utilize. In my environment, the Fulfiller would only see the Catalog Task not the RITM, because the Catalog Task is what shows up in the Fulfillers queue. Lets say someone orders a computer chair, my client would like the Fulfiller to have the ability to cancel the entire order, for the computer chair, for whatever reason he/she sees fit. The client wants the current task that the Fulfiller is on and its successor tasks cancelled. They also want the RITM that generated these tasks to be cancelled along with the active workflow.



But I did figure out why the UI Action wasn't working on the RITM level. There was a Business Rule in my way that does not allow me to close the RITM without closing the tasks. The 2nd task generated is set to Rejected and I'm not sure how that happened. The state of the 2nd task needs to be set to Closed Cancelled, like the 1st task, to satisfy the BR. I think it should work after that.



Business Rule:


find_real_file.png


Hi Samiul,

We have similar requirement "cancel all associated RITM and SCTask when a Request is cancelled", here we have UI button"Cancel Request" on request form. Could you please help me on this.

Thanks, Jay