Assigning the variables in variable sets in a record producer ti incident caller ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2024 10:48 PM
So,
My requirement is there is an check box called is it requested by someone. When this is selected another requested for field will appear. So the user entered in this requested for should be the caller in Incident. I have provided the existing code below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2024 10:53 PM
Can you try this:
if(!gs.nil(producer.logged_in_user))
{
current.caller_id = producer.logged_in_user;
current.contact_type = 'mobito';
}
else
{
current.caller_id = gs.getUserID();
current.contact_type = 'self-service';
}
Hope it helps:)
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2024 11:01 PM
No,
these are pre existing fields. I need to check whether the variables on the item is ticked. And it gets checked, the requested for field should be populated in caller area. How do i do this? I have not added the variables names in the above script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2024 11:10 PM
Try this now:
current.description = producer.Please_describe_your_issue;
current.description += "\n\nComputer: " + producer.computer;
current.description += "\n\nPickup Location: " + producer.pickup_location;
if (JSUtil.notNil(producer.logged_in_user)) {
current.caller_id = producer.logged_in_user;
current.contact_type = 'mobito';
} else if (producer.requested_by_someone == "true") { //replace with your actual name
current.caller_id = producer.requested_for; // give the actual another requested for variable name
} else {
current.caller_id = gs.getUserID();
current.contact_type = 'self-service';
}
lmk if you still stuck
Murthy