Open widget within service portal modal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I've tried for days to get this to work but nothing is working (even Copilot's suggestions).
I have a widget from the Appointment Bookings scoped app called "Appointment Booking - Select" (ID: sn-appointment-booking-select).
I want this widget to display within a modal in another widget (we'll call it Widget A).
Widget A displays case details and has an Actions dropdown. One of the options in the dropdown is "Reschedule appointment". When the customer clicks this, I want a modal to appear with the "Appointment Booking - Select" widget so the user can select another time slot.
How do I do this? I'm banging my head here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
First you have to add the onclick event on the "Reschedule appoint". So as example maybe you are using ng-click="c.openModal()" this function to open the modal Now in the client controller part add the spModal wrapper class Now call the widget through the fucntion c.openModal c.openModal = function(){ spModal.open({ title: <title of the modal>, widget: '<widget-id>', }) You can check for spModal wrapper class what all more value you have to pass
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
onclick (or Angular ng-click) event to the “Reschedule Appointment” button.For example, you might have something like this ng-click="c.openModal()"
This function will be responsible for opening the modal.
Next, in your client controller, make sure you include the spModal wrapper class.
Then, call the widget from inside your c.openModal function:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I appreciate the information but I still can't get the widget to display within the modal. Here is the configuration:
Use Case: Allow a customer to reschedule an appointment from the Service Portal
Design approach: Within a catalog case detail page, have an option in the Actions dropdown called Reschedule appointment. This will open a modal window that allows the customer to select another time slot using the Appointment Booking/Dynamic Scheduling logic.
The following are the service portal records involved:
- csm_ticket (page)
- Catalog Case Ticket Configuration (Ticket Configuration): Uses the Case Ticket Action Custom widget as the Action Widget
- Case Ticket Action Custom (widget): Displays an Action dropdown with the following options:
- Enable Support Access
- Escalate
- Request Callback
- Reschedule appointment
- Cancel appointment
- Accept Solution
- Reject Solution
- Close Case
- Appointment Booking – Reselect (widget): This is the widget I want to embed within a modal (either spModal or uibModal) and the modal is opened within the Case Ticket Action Custom (widget). The customer should be able to see available time slots using the Dynamic Scheduling/Appointment Bookings logic
Client controller (Case Ticket Action Custom widget)
}
