- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2018 09:47 PM
how to populate user phone number and Email-ID and Group manager name on incident form ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2018 10:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2018 09:50 PM
You can either configure the form layout and add these fields on the Form. User.Email, User.Phone Number and Assignment Group.Manager. All of these should be dot walked and added on form.
Or else you need to write a client script or business rule to populate these values which would involve scripting.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2018 10:14 PM
i am just adding a sample script to populated user information using the script include. same way you can try to get the group manager.
Create a Client Callable Script include :-
var GetUserDetailsAjax = Class.create();
GetUserDetailsAjax.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getInfo: function(){
var obj={};
obj.email='';
obj.phone='';
var id=this.getParameter('sysparm_user_id');
var gr= new GlideRecord('sys_user');
if(gr.get(id)){
obj.phone=gr.phone.toString();
obj.email=gr.email.toString();
}
return JSON.stringify(obj);
},
type: 'GetUserDetailsAjax'
});
onChange Client Script :-
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var id = g_form.getValue('<user field>');
var ga = new GlideAjax('GetUserDetailsAjax');
ga.addParam('sysparm_name','getInfo');
ga.addParam('sysparm_user_id',id);
ga.getXML(CallBack);
function CallBack(response)
{
var answer = response.responseXML.documentElement.getAttribute("answer");
var user=JSON.parse(answer);
g_form.setValue('req_email', user.email); // set the value based on your field
g_form.setValue('req_phone', user.phone); // set the value based on your field
}
}
same concept you can apply to get the group manager name 'based on your group.
give a try and let us know if you need any further help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2018 10:23 PM
it's duplicate thread, please follow on one thread so it would be easy to follow up on your questions.
i had answered the same query on below thread.
i am just adding a sample script to populated user information using the script include. same way you can try to get the group manager.
Create a Client Callable Script include :-
onChange Client Script :-
same concept you can apply to get the group manager name 'based on your group.
give a try and let us know if you need any further help.