- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 12:56 AM
Hi There,
When an incident (Report something broken) is submitted on the ESS_Portal, the user's call back number is not populated. This is populated if the Incident is put in the back end "Service Desk" side. We need it to be consistent.We do not have a phone variable in "Report something broken" form but it should populate in the incident form after submit. Call back number field should pull value from phone field in the sys_user table. How can i do this?
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 11:51 AM
I would probably do this a little differently....
as I see it ... unless you manually enter an incident the call back number isn't populating... this means it won't work from the catalog or any other incident creation process.. yes you can do this with a catalog script on the item.. but that won't help if you come up with a different method of creating incidents... <inbound email, create incident ui actions from another record etc..>
what is really needed is that if a record is inserted into the table and the call back number is blank it should be populated from the user table... <i was going to ask why not just remove the call back number and add the users phone number from the table to the incident form.. but i suspect you want them able to specify a call back number OTHER than the default>
if what you are trying to acomplish is to ensure that all entries have a call back number i would use a before br on the incident table..
before insert <not update>
conditions call back number is empty
actions call back number to user.phone_number <use the correct field here>
if that isn't available in actions and it may not be depending on the types of fields involved... advanced checked with the following script
current.u_call_back_number_field_name = current.caller_id.phone_number //again use the right field name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 01:32 AM
Hi Shamma,
this is what i'm getting and its not showing the phone number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 01:42 AM
Hi Sarasaamani,
Try this:
function onAfter(current, previous) {
var caller=current.contact;
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id',caller);
gr.query();
if(gr.next()){
current.u_call_back_number=gr.mobile_phone.getDisplayValue();
}
current.update();
}
Thanks,
Farukh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 02:28 AM
Hi Saaraamani,
At one can you try putting the mobile phone there and let me know if you get any issue.
Regards,
Shamma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2017 08:39 AM
Worked perfect for me. Thanks for the solution!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 04:13 AM
Hi Jason,
Please put the comment as helpful if it helped you.
Regards,
Shamma