- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 06:29 AM
Hi Team,
I have a requirement that there should be one button in Service Operation Workspace - incident form. When the user clicks the button there should be popup with caller's phone number. It should be clickable.
Any help would be appreciated & helpful.
Thanks in Advance,
Nivethika
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2024 03:20 AM
hi @nivethika
Try bellow:
- create a new UI Action.
- Fill in the following fields:
- Name: Call
- Table: Incident [incident]
- Condition: current.caller_id.isValid() (ensures the caller is set)
- Action name: show_caller_phone
- Show in list: false
- Show in form: true
- Client: true
function showCallerPhone() {
var callerPhone = current.caller_id.phone; // Fetch the caller's phone number
if (callerPhone) {
var html = '<a href="tel:' + callerPhone + '">' + callerPhone + '</a>';
var dialog = new GlideModal('Caller Phone');
dialog.setBody(html, false);
dialog.setTitle('Caller Phone Number');
dialog.render();
} else {
alert("No phone number found for the caller.");
}
}
// Call the function when the button is clicked
showCallerPhone();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2024 04:21 AM
Try changing the browser once, sometimes it happens.
Also have one check if above anything not works, create simple UI action and check that working or not.
