I needed to generate the navigations for all the content references in peoplesoft as some of the users needed the ready reference. I had created some custom objects and then populated a custom table with all the necessary information.
Step 1:
Create a work record with a dummy field.
step 2:
On the fieldchange peoplecode of that work field add the following code.
step 3:
import PTLT_SETUP:Utility;
&FindObjects = create PTLT_SETUP:Utility();
SQLEXEC("DELETE FROM PS_PSOFT_NAV");
&SQL = CreateSQL("SELECT PORTAL_NAME,PORTAL_URI_SEG1,PORTAL_URI_SEG2,PORTAL_URI_SEG3 FROM PSPRSMDEFN WHERE PORTAL_URI_SEG2<>'' and PORTAL_NAME=:1", %Portal, &PORTAL, &MENUNAME, &PNLGRPNAME, &MARKET);
While &SQL.fetch(&PORTAL, &MENUNAME, &PNLGRPNAME, &MARKET)
&NAVIGATION = &FindObjects.GetNavigationFromComponent2(&PNLGRPNAME, &MARKET, &MENUNAME, &PORTAL);
SQLExec("insert into PS_PSOFT_NAV VALUES (:1,:2,:3,:4,:5)", &PORTAL, &MENUNAME, &PNLGRPNAME, &MARKET, &NAVIGATION);
End-While;
step 4:
add this work record.field to any page in EMPLOYEE/CUSTOMER/SUPPLIER or any other portal you use.
step 5:
from the PIA for that portal, fire this code
step 6:
SELECT * FROM PS_PSOFT_NAV
excellent!!
ReplyDelete