
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2022 08:32 AM
I have a customer widget that, when a user clicks a record, it opens the form in a modal overlay. However, it uses the default view of the form. It doesn't use a URL and so I can't simply modify that to force it to use a different view.
Can anyone help me work out how to force it to use the sp view please?
This is the part of the client script that opens the record:
c.openRecord = function(record){
c.modalInstance = $uibModal.open({
//template: '<div class="modal-header" h4 class="modal-title">Record Name</h4></div>' +
//'<div class="modal-body">{{ modalC.record | json }}</div>',
templateUrl: 'swap-shop-item-overlay.html',
controllerAs: 'modalC',
controller: function() {
var modalC = this;
modalC.record = record;
modalC.modalInstance = c.modalInstance;
spUtil.get('widget-form', {
sys_id:modalC.record.sys_id,
table:c.data.table
}).then(function(response) {
modalC.form = response;
})
}
})
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2022 09:48 AM
spUtil.get('widget-form', {
sys_id:modalC.record.sys_id,
table:c.data.table,
view: 'sp'
}).then(function(response) {
modalC.form = response;
})
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2022 09:48 AM
spUtil.get('widget-form', {
sys_id:modalC.record.sys_id,
table:c.data.table,
view: 'sp'
}).then(function(response) {
modalC.form = response;
})

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 02:05 AM
Outstanding. Thank you. I'd tried something similar but wasn't sure of the syntax.
Works a treat.