getreference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2024 07:52 AM
if Caller - Manager and Assigned TO - Manager both are same,then alert message.?
"Both Caller and Assigned To Manager are same"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2024 07:57 PM
@SANNAPUREDDYV You can do on change client script or on submit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2024 08:17 PM
can you provide onchange client script code for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2024 08:04 PM
onsubmit client script
Sample code
Var callerManager,assignManager;
Var cM= g_form.getReference("u_caller",callBack);
function callBack(cM)
{
CallerManger= cM.manager.toString();
}
Var aM= g_form.getRefence("u_assignedTo", setBack);
function setBack(aM)
{
assignManager= aM.manager.toString();
}
if( callerManager && assignManager)
{
If(callerManager==assignManager)
{ alert ("...");}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2024 08:31 PM
Hello @SANNAPUREDDYV :
//OnChange client script on assigned to
var callerId = g_form.getValue('caller_id'); // Get the caller ID
var assignedToId = newValue; // The new value of assigned_to (triggered on change)
// Caller's manager
g_form.getReference('caller_id', function(callerUser) {
var callerManagerId = callerUser.manager; // Get the manager's sys_id of the caller
// Assigned_to's manager
g_form.getReference('assigned_to', function(assignedToUser) {
var assignedToManagerId = assignedToUser.manager; // Get the manager's sys_id of the assigned_to
//Check
if (callerManagerId === assignedToManagerId) {
alert('The manager of the caller and the assigned to are the same!');
}
Note: This approach avoids server-side processing, but still this will cause performance issues with user experience.
Please hit the thumbs up if this resolves your issue.
Thanks,
Kiran