theBeastMaster
Mega Guru
Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
05-24-2020
01:33 AM
This video demonstrates how we can provide an option to the users who are working on the tickets to have the luxury to directly communicate with users via WhatsApp. Steps followed are as below:
1. Uploading the image.
2. Creating a UI Macro. Code for the function is as below:
function userWindow(reference){//incident.caller_id
var refVal = reference.split('.');
var fieldName = refVal[1];
var mob;
var demotext;
var sysId = g_form.getValue(fieldName);
var user = new GlideRecord('sys_user');
if(user.get(sysId)){
mob = user.mobile_phone.toString();
demotext = 'Hi '+user.first_name;
}
mob = mob.replace(/[^0-9]+/gi, '');
if(mob){
open('https://wa.me/'+mob+'?text='+encodeURIComponent(demotext), '_top');
}
}
3. Adding the macro to the dictionary of the concerned field.
- 3,533 Views
2 Comments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.