You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

How to append emplid to external URL string from PeopleSoft menu

3 replies [Last post]
mitchellb's picture
User offline. Last seen 9 years 41 weeks ago. Offline
Joined: 06/12/2009
Posts: 2

I am able to setup Structure and Content/Content Ref Administration so that I can go to an external URL from a PeopleSoft menu item thanks to the excellent tip on this site. I also need to pass the signed-on employee's id to the URL string in order to login to the external app. I have created a Conten Referenct Attribute called EMPLID with the attribute value of %EmployeeId, translate is checked. I set the Portal URL to this:
http://cfatigue2:9090/workforce/SSO.do?%EmployeeId

When I test the link, I get exactly that portal URL. %EmployeeId is not tranlated into an actual employee ID. I was hoping it would resolve to:

http://cfatigue2:9090/workforce/SSO.do?100001

(1000001 is my EMPLID.)

What am I missing? Thanks.

accasey's picture
User offline. Last seen 11 years 12 weeks ago. Offline
Joined: 06/12/2009
Posts: 5
Re: How to append emplid to external URL string from ...

So I assume you are doing a ViewContentURL() function? I assume you have a static URL apart from the employee ID? You can use the ViewContentURL and set the URL by PeopleCode. And then append the employee id string.

So you could do the following.

Local string &strURL;

&strURL = GetURL(URL.MY_STATIC_URL);
rem Now the &strURL will equal http://cfatigue2:9090/workforce/SSO.do;
rem Append the Employee ID;
&strURL = &strURL | "?" | %EmployeeID;

ViewContentURL(&strURL);

mitchellb's picture
User offline. Last seen 9 years 41 weeks ago. Offline
Joined: 06/12/2009
Posts: 2
Re: How to append emplid to external URL string from ...

Thanks, but I'm not using that function. This is being setup using the Structure and Content PeopleSoft menu. Our goal is to have the user click on a menu link on the PeopleSoft main menu and be taken to an external site while passing the emplid in the URL string. Is it possible to use peoplecode on a menu item within the Content Ref Administration / Content Reference?

accasey's picture
User offline. Last seen 11 years 12 weeks ago. Offline
Joined: 06/12/2009
Posts: 5
Re: How to append emplid to external URL string from ...

I remember doing what your doing but it was just hardcoded to a value (I think). Alternatively you could set up a CREF which is an iScript - that way it can be called from the portal. The iScript can then just contain the PeopleCode I mentioned before.