Monday, March 21, 2011

GenerateComponentContentURL

The below sample PeopleCode can be used for Generate Component Content URL.

If All(SCH_MGR_SRCH_VW.EMPLID.Value) Then
Local string &URL;
&URL = GenerateComponentContentURL(%Portal, %Node, MenuName.ROLE_MANAGER, "GBL", Component.TL_MGR_USER_PREF, Page.SCH_EE_PREF, "C", SCH_MGR_SRCH_VW.EMPLID);
ViewContentURL(&URL);
End-If;

9 comments:

IB novice said...

Hi, Is there a way to use this command to control whether the component is to be opened in a new window page/tab?

Thanks!

Pawan Mundhra said...

those are browser specific. I don't think we can have control on that using peoplecode. Below are the options available in peoplecode.

ViewURL - loads the entire Portal frameset into the target frame;
ViewContentURL - loads the frameset properly, but only in a new window / tab;
%Response.RedirectURL - loads the entire Portal frameset into the target frame.

Srini said...

Is there a way to get the full URL string for the current page that you are on?

Pawan Mundhra said...

You can use pass meta variables in the above function as %Menu, %Market, %Component..

Srini said...

Thanks for the reply.

I am able to get upto component but unable to get the string after that

Below is an example of complete URL that I want to capture

http://xxxxxxxxxx:8200/psp/pshcmdev/EMPLOYEE/HRMS/c/CV_CUSTOMIZATIONS.CV_HR_PAYROLLN.GBL?EMPLID=000131907&EMPL_RCD=0&EFFDT=2012-04-09&ACTION=HIR&ACTION_REASON=NPS&PAYGROUP=CPB

Pawan Mundhra said...

I am able to get the.. Here what I got..

Code:

&MyUsrl = GenerateComponentContentURL(%Portal, %Node, MenuName.RND_TEST, %Market, Component.PUB_SUB, Page.PUB_SUB, "U", PUB_SUB_REC.EMPLID);

Result:

http://xxxxxx:xxx/psc/dev/EMPLOYEE/HRMS/c/RND_TEST.PUB_SUB.GBL?Page=PUB_SUB&Action=U&EMPLID=ABC

Srini said...

Is there a way to get the unique session number when a user is in peoplesoft application ?

marekorama said...

It may be late, but if you want to have the navigation URL open in a new tab, use ViewContentURL and substitute the psc in the generated URL with psp.

Example:
&sNavigationURL = GenerateComponentContentURL(%Portal, %Node, MenuName."SP_MENU", "GBL", Component."SITE", Page."SITE", "U", &lrSite);
&sNavigationURL = Substitute(&sNavigationURL, "psc", "psp");
ViewContentURL(&sNavigationURL);

Chocku said...

Hi Pawan,

From where is it generating this part "http://xxxxxx:xxx/psc/dev". In my case it is generating a wrong value. So trying to see from where it is coming. Please help!!!

Post a Comment