cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1001
Views
5
Helpful
4
Replies

How to access agent LoginName in Finesse Gadget

smeegada1
Spotlight
Spotlight

How to access agent LoginName in Finesse Gadget.Am able to access Extension, ID but not loginName.Any info is helpful.

2 Accepted Solutions

Accepted Solutions

@smeegada1, to get the login name, you need to:

  • In the gadget initialization function, u need to create a user object (as you can find in the documentation):
_user = new finesse.restservices.User({
	id: id, 
	onLoad : _handleUserLoad
});

 

  • Then you can get the login id using the following code:
_user._data.loginName;

 

Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

View solution in original post

var ID = user._data.loginName;

Look at the underline in the data part.

Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

View solution in original post

4 Replies 4

@smeegada1, to get the login name, you need to:

  • In the gadget initialization function, u need to create a user object (as you can find in the documentation):
_user = new finesse.restservices.User({
	id: id, 
	onLoad : _handleUserLoad
});

 

  • Then you can get the login id using the following code:
_user._data.loginName;

 

Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

Hi,

I already have below code in my init fucntion to load user object and accessing loginID with var ID1 = user.getId(); already.

 

user = new finesse.restservices.User({
id: cfg.id,
onLoad: _handleUserLoad,
onChange: _handleUserChange
});

 

You mean i can access loginName with below snippet?

 

var ID = user.data.loginName(); or var ID = user.data.getloginName(); or any different?

 

Thanks for response.

 

 

var ID = user._data.loginName;

Look at the underline in the data part.

Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

Thank you, it worked.