Create Incident and Create Request UI Actions in Interactions not working in Native view

Rakesh50
Mega Sage

Hi ,

We want to use the create request and create incident in interaction native view. These buttons are working as expected in Agent Workspace but when it comes to native view not working. For create incident UI action, incident is creating but it is not linking to the interactions. We found there is an OOB BR "Link Interaction m2m" it's creating record in the "interaction_related_record" table and it's work only when we submit the agent workspace only.

So how can we use it through the native view also ?

Create Request is not opening anything in native view. So how can we use both UI Actions in native view of Interactions ?

Thanks,

Rakesh T

 

 

1 ACCEPTED SOLUTION

The code is missing the part where the association record is created. I guess you have not copied it over, cause it did not work anyway. That is because the OOB solution is pretty tied to how Workspaces work. It expects the submission of the incident to be done from the same page in which the button has been pressed. This is doable in Workspace, because it is a single-page web application, but not so much in UI16: when you press the Create Incident button, the page is re-loaded. No matter whether the UI Action saves the current record or just navigates to a new one. This can be seen in business rule Link interaction to incident on Incident.

There are two solutions to this:

- make the Create Incident UI Action a server environment only UI Action and add code to create the association record (in table interaction_related_record); have a look at UI Action Create Incident on Interaction with Action name "ws_create_incident".

- make the Create Incident UI Action a client UI Action that opens a new Interaction record so that the URL will contain parameters that set the identity of the "source" Interaction. Then create an onAfter insert Business Rule on Incident that checks for those parameters in the transaction's referer HTTP header. Of course it should create the m2m record if the parameters point to an Interaction record.

I have expanded the solution to include everything that is necessary to have two UI16 compatible UI Actions on Interaction: Create Incident and Create Request. Both redirect when pressed, the former to a new Incident record, the latter to the Request Catalog. Upon Saving or Submitting the Incident and Ordering a Catalog Item, the created record is associated with the "source" Interaction.If the Interaction record needs saving when creating an Incident or a Request, the UI Actions prompt the user, save the record if confirmed by the user and redirects one to a new Incident the other to the Catalog.

The solution is and can be imported as an update set. UI Action Create Incident needs one enhancement: right now what field of the Interaction is copied into which field of the Incident is configured by editing a map in it. This should be extracted from the code and replaced perhaps with a property; or other means to store the map outside code. The UI Page can also be enhanced to dynamically load the Interaction record's record class name to support l10n.

Or you can just use it for inspiration. Hope it helps, and have fun! 🙂

View solution in original post

8 REPLIES 8

-O-
Kilo Patron
Kilo Patron

Would you share your work so it can be viewed and debugged?

I don't know that there is a specialized UI Action OOB for creating related Incident or Requested Item out of an Interaction. As far as I know there is only a generic "Associate Record" UI Action.

I have written an article on how to replicate the Create Request functionality for Platform UI: Transforming Incidents or any task into Requests. But for the Create Incident button, if you have created the UI Action correctly, it should be simple and working.

Hi @János 

Thanks for the reply. Create incident UI action is OOB and it is available in agent workspace but now we want to use it in interaction default view. so we have enabled the form button check box. But when we clicks it is redirecting to incident creation page and also also creating incident but it is not showing under related tasks.

But when we click create incident in agent workspace it is  creating incident and showing the record in related task related list of interactions

Here is the OOB script 

Hi @János 

Thanks for the reply. Create Incident UI Action is OOB and it is working perfectly in Agent Workspace. When I clicks in agent workspace view it is creating incident record and it is showing the created incident record in Related Task related list of Interaction 

But we need same functionality in Interaction native view as well. So we enabled the form button check box for create incident. But when we click on it we are able to create the incident but we unable to see the created incident record in Related Task related list of Interaction 

Here is the OOB Create Incident UI Action

Hi @János 

Here is OOB script for create incident which works only agent workspace not native view.