Ankur Bawiskar
Tera Patron

Hi,

you are using wrong syntax

Update as this and there should be no error

I assume you want dept_head of the user

var Bringattributeuser = Class.create();
Bringattributeuser.prototype = Object.extendsObject(AbstractAjaxProcessor, {

	getDepartmentHeadUser: function() {
		var userID = this.getparameter('syspara_sys_user');
		var Gr_emp = new GlideRecord('x_bifac_hr2h_emp');
		Gr_emp.addQuery('user_name', userID);
		Gr_emp.query();
		if (Gr_emp.next()) {
			var deppid = Gr_emp.department.dept_head;
			return deppid;
		}
	},

	type: 'Bringattributeuser'
});

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader