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

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

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

View solution in original post

Dear Cody Smith,

 

Thank you very much.

It is working fine.

Thank you for your help.