- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 06:02 AM
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
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 02:57 PM
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! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 11:02 PM
Hi
Thank you for the response. When I click on Create Incident button which is OOB that is working only in agent workspace not in interaction form native view
here is screenshot of create incident. We are expecting this UI action to work in both agent workspace and native view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 04:21 PM
The screen-shot is not visible; try again adding it.
Also I don't know an OOB "Create Incident" Form buttom UI Action on Interaction.
As for the Create Request button, I have created a solution consisting of a UI Action, a UI Page and a UI Script. Will try to attach a Remote Update set to this post (hopefully it will not be cleansed).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 11:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 02:57 PM
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! 🙂