PeopleCode Bypass Search Page by Role

Your rating: None Average: 2.5 (4 votes)

Sometimes you would like to bypass the search page depending on the
user's role. For some users, they need the ability to look at other
employee’s time sheets, managers for example. However, for others, they
should only be restricted to their own data. Below is PeopleCode
example that will bypass the search page depending on users' role.

&FLAG_ROLE = "Y";
For &I = 1 To %Roles.Len;
If %Roles [&I] = "CSR" Or
%Roles [&I] = "Operations Service Center" Then
&FLAG_ROLE = "N";
/*Allow this person to enter the search page*/
SetSearchDialogBehavior(1);
/*Unhide name for user to be able to search */
UnHide(your_search_record_onthe_component.NAME);
End-If;
End-For;
If &FLAG_ROLE = "Y" Then
your_search_record_onthe_component.EMPLID = %EmployeeId;
/*Hide emplid and name so user can not search*/
Hide(your_search_record_onthe_component.EMPLID);
Hide(your_search_record_onthe_component.NAME);
/* skip search page */
SetSearchDialogBehavior(0);
AllowEmplIdChg( True);
End-If;

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
Guest - Amrit's picture
Guest - Amrit (not verified)
Re: PeopleCode Bypass Search Page by Role

Hello,

I wish to bypass the search page only when at least 2 of the 3 keys are parsed in the URL

example http s://xxx.xx.x.x.x.x./MANAGER.MANAGER.GBL?EMPLID=1000000&C4_COMMITTEE_ID=ABC

when clicking on the link, the user is then prompted to login. Then the next page that is loaded is :
http s://xxx.xx.x.x.x.x./MANAGER.MANAGER.GBL
the parameters are lost .. and the user gets to the search page..

do you have any method of keeping the parameters and bypassing the search page ?

Regards,
eXeC-

Lepa's picture
User offline. Last seen 36 weeks 1 day ago. Offline
Joined: 06/23/2008
Posts: 591
Re: PeopleCode Bypass Search Page by Role

They should not be lost unless you are not passing enough keys for the component to figure out what row to return. The user should be taking straight to the page after they login. Make sure you have all the keys from the search record in the URL.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest - Amrit's picture
Guest - Amrit (not verified)
Re: PeopleCode Bypass Search Page by Role

They are all here.. all keys..
i noticed on one of our servers.. it's good! i can pass parameters before a log on.
It should be a configuration somewhere.. but i do not know where to look for.. version is 8.4x
..

Raja's picture
Raja (not verified)
Re: PeopleCode Bypass Search Page by Role

Hi Amit,
I have similar issue. Did u get any resolution?

Thx