- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2024 09:28 AM
Hi,
I have a link on the Service Portal and I want to open a Glidemodal ( or a popup) window showing 2 reference fields and related fields on the form. On submit of the modla, it has to execute some logic and show an info message on the modal. How do I do that?
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2024 11:14 PM
Hi @maryc ,
I tried to showing email in reference field
<sn-record-picker field="location" table="'sys_user'" display-field="'name'" display-field="'email'" value-field="'sys_id'" search-fields="'name'" page-size="100" ></sn-record-picker>
By doing this small change it shows email id you just need to change one parameter in sn-record-picker for email display-field="'email'"
Result
Please mark my answer correct and helpful if this works for
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2024 09:57 AM
Hi @maryc ,
I checked your problem I already did something like that please refer below code
HTML
<button type="submit" media="print" ng-model="data.submit" class="btn btn-group btn-primary" ng-click="c.openMessage()">View</button>
Client Script
c.openMessage = function()
{
spModal.open({
title: 'Message',
message: "test popup",
buttons: [
{label:'${Back}', cancel: true},
{label:'${Reply}', primary:true, focus: true}
],
size: 'lg',
});
}
Result
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2024 10:46 AM
How do I display some reference fields on the popup...like a user lookup and its corresponding fields field in?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2024 11:02 AM
Hi @maryc ,
I checked your problem in my PDI and please use below HTML code only it will work for you
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Location
<sn-record-picker field="location" table="'cmn_location'" display-field="'name'" display-fields="'city,zip'" value-field="'sys_id'" search-fields="'name'" page-size="100" ></sn-record-picker>
User
<sn-record-picker field="location" table="'sys_user'" display-field="'name'" display-fields="'city,zip'" value-field="'sys_id'" search-fields="'name'" page-size="100" ></sn-record-picker>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
I'm using sn-record-picker for both location and user table
Result
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2024 11:29 AM
Can you pls provide the entire code pls ...its not working for me
Also , how do I perform some logic when I click Save changes?
Thanks