How to get Manager of Manager's Manager of User as default value

SURESH KUMAR TH
Tera Contributor

Dear All,

How to get How to get Manager of Manager's Manager of User as default value?

Please help me. Thank you in advance

find_real_file.png

4 ACCEPTED SOLUTIONS

asifnoor
Kilo Patron

You can get like this.

gs.getUser().getUserByID(gs.getUser().getUserByID(gs.getUser().getManagerID()).getManagerID()).getManagerID()

Kindly mark the comment as a correct answer and also helpful once worked.

View solution in original post

Cody Smith _ Cl
Tera Guru

Hello Suresh,

You will need to keep nesting further and further into the User. It will look very confusing very quickly, but should be 

gs.getUser().getUserByID(gs.getUser().getUserByID(gs.getUser().getManagerID()).getManagerID()).getManagerID()

Where you will be adding 

gs.getUser().getUserByID

inside of the getUserByID.

 

I hope this helps explain it!

 

If this solved your problem, please mark as correct or helpful.

Thank you,

Cody Smith

View solution in original post

Thats awesome! 

Could you mark my answer correct if it helped you?

Thank you. 

View solution in original post

Hi,

Glad it helped. If my comment has helped you to achieve your requirement, would suggest you to mark it as correct answer so that the question is moved to the solved list.

View solution in original post

8 REPLIES 8

asifnoor
Kilo Patron

You can get like this.

gs.getUser().getUserByID(gs.getUser().getUserByID(gs.getUser().getManagerID()).getManagerID()).getManagerID()

Kindly mark the comment as a correct answer and also helpful once worked.

Hi Suresh,

If my answer has helped you, kindly mark my comment as a correct answer and also helpful so that the question is moved to solved list and others can benefit from it.

Cody Smith _ Cl
Tera Guru

Hello Suresh,

You will need to keep nesting further and further into the User. It will look very confusing very quickly, but should be 

gs.getUser().getUserByID(gs.getUser().getUserByID(gs.getUser().getManagerID()).getManagerID()).getManagerID()

Where you will be adding 

gs.getUser().getUserByID

inside of the getUserByID.

 

I hope this helps explain it!

 

If this solved your problem, please mark as correct or helpful.

Thank you,

Cody Smith

Dear Cody Smith,

 

Thank you very much.

It is working fine.

Thank you for your help.