Replicate "Create Work" action via Activity

Hello everyone! Hope you all are fine.

I want to replicate the exact behavior of the "Create Work" action, but on an activity. This means that if I call my activity in the Click event of a button, it will do the following things:

  1. Open a new tab.
  2. Create a new case.
  3. Display it in the new tab.
  4. The new tab will be my current tab, so my current thread in the Clipboard will be also for the new tab.

I traced the Create Work action when using it on a button and I see it executes Code-Security.ApplicationSetup activity and @baseclass.doUIAction activity with the "action" parameter set to "createNewWork" and several other params. I tried replicating that, setting the exact same parameters needed (action, className, flowName and portalName) but it does the following:

  1. Creates a new case.

It doesn't open a new tab or creates a new thread. It just creates a new case.

Could anyone please provide some help regarding this? Please notice that using the Create Work action in a Section IS NOT what we need for this requirement. I specifically need to create a new case and display it in a new tab using an activity.

Thank you so much in advance!

EDIT 5/22/2019: I have also tried all suggestions from this post, none of them work for my case.

***Edited by Moderator Marissa to update platform capability tags****


Keep up to date on this post and subscribe to comments

May 23, 2019 - 1:08am

You can call pxCreateTopCase activity to create a case and configure 'open work by handle' in UI actions to open the newly created work item.



May 23, 2019 - 1:20pm
Response to BharathKakaraparthi

Hello @BharathKakaraparthi,

Thank you so much for you answer! 

I see that approach will work. My only issue is that I can not use ANY actions from UI, I need that both the case creation and opening it in a new tab happen all as part of an activity. The Create Work action in a button does exactly what I need, but I can't use any action via UI due to my requirement. I need it all via activity.



May 23, 2019 - 1:46pm

You can try RedirectAndRun activity which takes location as a param which will open a new tab.

The below link seems to be relevant.