Monday, March 26, 2007

Determine Hidden Folders and Content References for Portal Navigation

If you do not see a folder or content Reference (Menu Item) in Left hand side navigation, (Applicable to 8.4x ) then you must check to see if the folder or content reference is not marked as hidden. Other reasons could be security. Here is a SQL to find out all the objects that are hidden.

To find all the folders which are hidden from Portal Navigation.

select * from PSPRSMSYSATTRVL where portal_name = 'EMPLOYEE' and PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV' and portal_Reftype = 'F'

select a.portal_objname,b.portal_label,b.portal_prntobjname,c.portal_label
from PSPRSMSYSATTRVL a,psprsmdefn b,psprsmdefn c where a.portal_name = 'EMPLOYEE'
and a.PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV'
and b.portal_Reftype = 'F' and a.portal_name = b.portal_name
and a.portal_objname = b.portal_objname
and b.portal_name = c.portal_name
and b.portal_prntobjname = c.portal_objname

To find all the content references which are hidden from Portal Navigation.

select * from PSPRSMSYSATTRVL where portal_name = 'EMPLOYEE' and PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV' and portal_Reftype = 'C'

select a.portal_objname,b.portal_label,b.portal_prntobjname,c.portal_label
from PSPRSMSYSATTRVL a,psprsmdefn b,psprsmdefn c where a.portal_name = 'EMPLOYEE'
and a.PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV'
and b.portal_Reftype = 'C' and a.portal_name = b.portal_name
and a.portal_objname = b.portal_objname
and b.portal_name = c.portal_name
and b.portal_prntobjname = c.portal_objname

 

Replace EMPLOYEE with Your portal name. Some of the Other names are.

CUSTOMER
DEMOSITE
EMPLOYEE
MOBILE
PORTAL
PS_SITETEMPLATE
SUPPLIER

Portal Content Reference/folder Attributes are stored in

PSPRSMSYSATTR

PSPRSMSYSATTRVL

Thursday, February 22, 2007

Online Performance Configuration Guidelines for PeopleTools 8.45, 8.46 and 8.47, 8.48

You should carefully review and implement ther performance guidelines to get Optimal performance from your PeopleSoft Application. This document is posted on Customer connection and you will need a loginid and password to access it. Here is the direct link.

Online Performance Configuration Guidelines for PeopleTools 8.45, 8.46 and 8.47, 8.48

Tuesday, February 20, 2007

Troubleshoot Workflow EMAIL (SMTP Server) issues.

Many time End users get an Error message : Unable to Send Email, Invalid ID, while saving the page. This usually means some kind of issue while sending email from your appserver or batchserver using the SMTP Server. The error message is not correct and to get the exact reason, why send email is failing, you need to add/Update the following in your appserver configuration (PSAPPSERV.CFG) or batch server Configuration (PSPRCS.CFG) under SMTP Settings.

SMTPTrace=1

1 means enabled, 0 - Disabled. This setting is sometimes not present in PSPRCS.CFG. You have to add it manually opening the file. This setting is dynamic and does not require reboot of the Server, which is very good for troubleshooting in production environments.

Once turned on, it will generate Trace file SMTP.LOG in LOGS Folder under $PS_HOME/tools/appserv/DOMAIN for Appserver and $PS_HOME/tools/appserv/prcs/DOMAIN for Batchserver.

Open SMTP.LOG and fix the issues logged in it. This will make your users to save the page.

Login to Two Tier using your Enterprise LDAP ID.

Normally, If you use LDAP Authentication for logging into your PeopleSoft application, you can not use the same id to login in Two Tier. This will force you to have multiple ids as you can do following in only two tier mode.

  • Data Mover access
  • Run Compare Reports
  • Build SQL Tables

This is not very convenient and not a secure approach. PeopleSoft  SOLUTION ID 200735608 - E-LDAP: LDAP Authentication does not work in 2-tier describes this behavior.

I have found this undocumented Trick to use the same LDAP ID to login to App Designer in Two tier mode. I have tested this in PeopleTools 8.43 only and it may not work in higher tools release. (Let me know in comments) Note: This trick does not bypass peoplesoft security. If you do not have access to underlying components or menu items (for e.g. DATA MOVER Or Run compare reports or Build SQL), you won't be able to perform this.

Here are the Steps.

  1. Login to App Designer in Three Tier. If you get an error message (You cannot sign on because the password for this user (PSOPRDEFN.OPERPSWD) isn't encrypted. Run encrypt_password * in Datamover, or change the password in Maintain Security.) , Press OK to continue and you will be logged in App Designer. The above message is a warning only and it does not prevent you from signon. This is identified as a known issue and is fixed in PeopleTools 8.46. See SOLUTION ID 200776124 - E-LDAP: Cannot logon 3 tier with LDAP user as ENCRYPTED field on PSOPRDEFN is set to 0
  2. Now Login to App Designer by running this from Start -> Run or create a shortcut on the desktop.

    <path to pside>pside.exe -CT ORACLE -CD dbname -CO userid -CI people -SUBSEQUENT -MN"APPLICATION_DESIGNER"

    Replace ORACLE With your DBType, userid with your LDAP Userid, people with your connectid if different. Note you do not need password as you are already logged in.
  3. You can run Data Mover from Go -> Data Mover Command once you are logged in 2 Tier mode.

Use Dynamic SQL for Prompts - SqlText

Normally you can not use dynamically generated SQL at runtime as your prompt record. You can use %EDITTABLE to specify the prompt table you want to use, but it has to be predefined. There is this little known property SqlText for Field Class, which allows you to do exactly that.

Here is the description and sample code taken from peoplebooks.

This property is valid only for fields that have a dynamic view as their prompt record. If you set SqlText to a non-null value, that text is used instead of the dynamic view's normal text used for prompting.

Suppose you wanted to have a different prompt table depending on the settings of other fields in the row. Normally you could use %EDITTABLE to dynamically specify the prompt table you want. However in this case there are too many possible combinations of values, which would require too many views. Furthermore, the values are customizable by the end-user or the application, which means even if you, the developer, wanted to, you couldn't provide all the combinations of views necessary. However you can generate the desired SQL text for the view in PeopleCode based on what the user enters.

If you use a dynamic view as the prompt table, and have the dynamic view contain a SQL object that is updated from PeopleCode, you could achieve this functionality. However, a SQL object is a shared object, so if multiple users used the same page, they overwrite each other's settings and the SQL object contains the SQL for the most recent user. Similarly if a single user had multiple rows on a page, the SQL object is valid only for the most recent row. This means if the user went to another row and did a prompt, they would get the wrong values again.

The purpose of this property is to enable you to specify the generated SQL text independently for each occurrence in each transaction. It enables you to override the text of a dynamic view being used as a prompt table on a field by field basis.

It is up to the developer to verify that the text specified for this property is valid, that is, that it selects the correct number of fields for the record definition, and so on.

This property is read-write.

Local string &SQLSTRING;

Function set_jrnl_id_prompt();
&SQLSTRING = "SELECT DISTINCT JOURNAL_ID, BUSINESS_UNIT_IU, JOURNAL_DATE, LEDGER_GROUP, SOURCE, SYSTEM_SOURCE, PROC_PART_ID, JRNL_HDR_STATUS, DESCR FROM PS_JRNL_HEADER WHERE JRNL_HDR_STATUS IN ('N','E','V')"
If All(JRNL_EDIT_REQ.BUSINESS_UNIT) Then
&SQLSTRING = &SQLSTRING | " AND BUSINESS_UNIT_IU='" | JRNL_EDIT_REQ.BUSINESS_UNIT | "'"
End-If;
If All(JRNL_EDIT_REQ.LEDGER_GROUP) Then
&SQLSTRING = &SQLSTRING | " AND LEDGER_GROUP='" | JRNL_EDIT_REQ.LEDGER_GROUP | "'"
End-If;
If All(JRNL_EDIT_REQ.SOURCE) Then
&SQLSTRING = &SQLSTRING | " AND SOURCE='" | JRNL_EDIT_REQ.SOURCE | "'"
End-If;
If All(JRNL_EDIT_REQ.SYSTEM_SOURCE) Then
&SQLSTRING = &SQLSTRING | " AND SYSTEM_SOURCE='" | JRNL_EDIT_REQ.SYSTEM_SOURCE | "'"
End-If;
If All(JRNL_EDIT_REQ.PROC_PART_ID) Then
&SQLSTRING = &SQLSTRING | " AND PROC_PART_ID='" | JRNL_EDIT_REQ.PROC_PART_ID | "'"
End-If;
GetRecord().GetField(Field.JOURNAL_ID_FROM).SqlText = &SQLSTRING;
GetRecord().GetField(Field.JOURNAL_ID_TO).SqlText = &SQLSTRING;
End-Function;

Tuesday, December 19, 2006

Data being added conflicts with existing data

If users are encountering this error, chances are that your sequence no. table is out of synch with your main transaction table. For e.g. this can happen while hiring a new employee and a new employee id needs to be generated. PeopleSoft delivered code uses SQLExec approach to

  • First Update the Sequence to next number
  • Selecting the sequence from the table
  • Assign this to page field

This method works fine, except where you are calling this function conditionally in Saveprechange event and Subsequent workflow or savepostchange event errors out and PeopleSoft issues rollback and all changes to database are rolled back. This results in Sequence no table not being updated to next value. However the actual page field is updated with this new value. If the user is able to correct the error and save the page again, the peoplecode to update the sequence does not fire due to it's conditional execution. (for e.g. EMPLID = 'NEW' as emplid is already equal to a new value). Remember, error does not clear the page values only rolls back database changes. This results in your emplid in person table higher than last employee id in installation table. Now when the users trying to hire new employees it gives the above error.

The best way to avoid this is to use GetNextNumberWithGaps peoplecode function, which automatically increments the counter and commits the value to database. This also improves the database locking.

If for some reason you can not use this function, you can still use GetNextNumber or SQLExec and make sure that this gets executed all the time, even after the error has occurred in Workflow or savepostchange event. Instead of evaluating the current value of emplid = 'NEW' , store the value when the user enters the component in a component variable and use that variable for comparison. This will ensure that your update logic is firing all the time.

Here is the Old PeopleCode

Function assign_employee_id(&EMPLID);
&LENGTH = INSTALLATION.EMPLID_LENGTH;
&CHECK = Rept("9", &LENGTH);
SQLExec("Update PS_INSTALLATION Set EMPLID_LAST_EMPL = EMPLID_LAST_EMPL + 1");
SQLExec("Select EMPLID_LAST_EMPL From PS_INSTALLATION", &EMPLID);
If Value(&EMPLID) > Value(&CHECK) Then
SQLExec("Update PS_INSTALLATION Set EMPLID_LAST_EMPL = EMPLID_LAST_EMPL - 1");
Error MsgGet(1000, 74, "The maximum Employee ID of %1 has been assigned.", &CHECK);
Else
&EMPLID = Rept("0", &LENGTH - Len(&EMPLID)) | &EMPLID;
End-If;
End-Function;

Here is the new PeopleCode

Function assign_employee_id(&EMPLID);
&LENGTH = INSTALLATION.EMPLID_LENGTH;
&CHECK = Rept("9", &LENGTH);
&EMPLID = GetNextNumberWithGaps(INSTALLATION.EMPLID_LAST_EMPL,&CHECK,1);
Evaluate &EMPLID
When = %GetNextNumber_SQLFailure
/* Do Error processing */
break;
When = %GetNextNumber_TooBig
Error MsgGet(1000, 74, "The maximum Employee ID of %1 has been assigned.", &CHECK);
break;
When = %GetNextNumber_NotFound
/* Do Error processing */
break;
When-other
&EMPLID = Rept("0", &LENGTH - Len(&EMPLID)) | &EMPLID;
End-Evaluate;
End-Function;

Friday, December 15, 2006

Search PeopleSoft Customer Connection for Solutions to most common issues

PeopleSoft customer connection website has been recently enhanced with a new feature : Knowledge browser. This will allow you to look for most common resolutions easily. You can also download a spreadsheet containing solutions by product area.

Navigation : Support -> Online Support -> Knowledge Browser -> Peoplesoft Enterprise

Direct URL : http://urlic.com/knowledgebrowser (Enter your customer connection Userid and password). Following High level topics are available.