Tuesday, 22 July 2014

How To set Multiple Related Display Fields in Grid on Peoplesoft Pages:


There could be chances that we are required to access the related display field on grid. If there is only one record field as related display then its fine, no problem there. But it is complicated when there are multiple related displays from the same record fields.

Let us say that in one of the grid we want to show the names for JOB.SUPERVISOR_ID and JOB.EMPLID and these fields are display control fields and related fields for both is PERSON_NAME.NAME so referencing the related field of JOB.SUPERVISOR_ID will be an issue with the grid referencing syntax as it will reference the related field of JOB.EMPLID also.

Now here is the syntax for the same:

Let row of that field is &Grid_Row

Now accessing the related field of JOB.SUPERVISOR_ID:

&Grid_Row. JOB.SUPERVISOR_ID.GetRelated (PERSON_NAME.NAME).value;

Now accessing the related field of JOB.EMPLID:

&Grid_Row. JOB.EMPLID.GetRelated (PERSON_NAME.NAME).value

Dynamic Role In PeopleSoft


Roles (and permission lists) can be assigned to users dynamically in PeopleSoft using dynamic role rules. The logic used to assign a dynamic role can be in the form of query, PeopleCode or directory (e.g. LDAP) rule.

The application engine program DYNROLE_PUBL assigns dynamic roles by using the logic in the query, PeopleCode or directory rule to obtain a list of operator IDs. The role itself is assigned by the ROLESYNCHEXT_MSG service operation through internal messenging and integration broker.

You can see which dynamic roles are assigned to a user in the user profile page under the roles tab like any other role. You can also open the dynamic role and view dynamic members (users) of that role. Both areas allow you to test and execute the dynamic role rule. The test rule button returns users that will be given the dynamic role, however it does not assign the role. The execute rule actually assigns the dynamic role by running the DYNROLE_PUBL application engine program.

In addition to using a dynamic role to assign security through one or more permission lists, you may also want to use a dynamic role simply as a tag.

For example you might give students a dummy role of Alumni if they have completed a degree at your University. The logic to determine whether they have completed a degree could be in the form of a query or PeopleCode rule. As students are awarded degrees, they are automatically given the dynamic role. If for some reason, a degree is withdrawn, the role will automatically be removed.

PeopleCode could then simply check if a user has the dummy Alumni role and then show or hide appropriate functionality.

It is important to know that dynamic roles are added and removed automatically based on the results of the rule. You only need to write the rule to determine those operators that should get the role. PeopleSoft will add the role to those users that meet the rule criteria and remove it from those users that have the dynamic role but no longer meet the rule criteria. For example a student with an Alumni dynamic role, who has had their degree withdrawn would lose that role dynamically.

PeopleTools 8.50/8.51 AJAX issues(Intermittent "Error 501--Not implemented" Messages )


After immediately upgrading to PeopleTools 8.50, we have encountered several issues that were related to new AJAX features introduced in 8.50. Here is the list of such issues

1.  Getting frequent error 501 not implemented on the browser with IE7 and IE8.
2.  Component page reset. Users are getting kicked out to first page or the search dialog box in the middle of a multi page transaction and losing the data they have entered.
3.  Suddenly the page will become unresponsive and entire browser will freeze and will require restart of the browser.

All the 3 symptoms were annoying for the users and we eventually traced it to AJAX feature, that results in loss of POST data.

Temporary Solution:-

Turning off the AJAX setting resolved all 3 issues. Here is a way to turn off the AJAX

Go to PeopleTools –> Web Profile > Open the Web profile you use for e.g. DEV or PROD.


Go to Custom Properties and Add a Property AJAX of type Boolean and set its value to false. This will turn off the AJAX. To enable it again make it true or remove the row. Bounce all the Web servers using this web profile to make this setting take effect.


Permanent Solution:-

Though the above changes resolves the issue, this is not desirable and also may not be supported in future peopletools release. I have found this issue to be related to a bug in IE7 and IE8 when used with Windows XP OS. Fortunately microsoft includes the hotfix to resolve the issue, however registry change needs to be made to enable the hotfix. For more details, see this following KB http://support.microsoft.com/kb/895954 - When you use Microsoft Internet Explorer or another ! program to perform a re-POST operation, only the header data is posted.

 See How to enable this hotfix section for registry changes.

Basically, the issue happens as IE sends the AJAX request in 2 tcp ip packets one for the header and one for the body. When network error happens, and ie tries to send the ajax request again, it fails to send the body. This causes PIA to loose the session state and we see the issues described above. The other browsers Firefox, Safari and Chrome do not send ajax request in multiple packets and this issue does not appear there.

Also see this article on further clarification on which registry key needs to be modified : http://www.geoffchappell.com/viewer.htm?doc=notes/windows/ie/featurecontrol.htm

According to this , you can specify the value in any one of the following location, in order of decreasing precedence.
  • HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main\FeatureControl
  • HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\FeatureControl
  • HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl
  • HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl


Display Prompt on a Search dialog box



If you have a prompt defined on a search record, it does not get displayed if you have component properties –> Internet tab set to use Basic Mode. (Default). Only Advanced mode displays the prompt on the search dialog box.


How to Default SYSDATE (Current Date) for PeopleTools Query Prompt Automatically

If you have a Query or Crystal Report, that has a date prompt and you want to schedule the report daily, so that date value is defaulted to sysdate (Current date), you can do this as follows.


  • Open the Query in PeopleTools Query tool.
  • Go to Criteria tab. 
  • Right Click on Expression2 Column and Select Expression or Expr-Expr if you are using between operator.


Type the following in Edit Expression.
Type
Default Date
Expression
Criteria
current date
decode(:1,TO_DATE('1900-01-01','YYYY-MM-DD'),trunc(sysdate),:1)

current date - 1
decode(:1,TO_DATE('1900-01-01','YYYY-MM-DD'),trunc(sysdate)-1,:1)

current date + 1
decode(:1,TO_DATE('1900-01-01','YYYY-MM-DD'),trunc(sysdate)+1,:1)

Replace :1 with the actual prompt value. You must first create this prompt.

Now you need to pass 01/01/1900 as an input parameter if you want to run the query for current date. Passing any other values will make the query run for that date.

This way you can achieve both i.e. run the query for a user selected date or run a query for current date which can be used to schedule. 

Note : You can use any date as a replacement for sysdate and not just 01/01/1900.

Also you can default it to any day relative to current date for e.g.trunc(sysdate) - 1 or trunc(sysdate) + 1 etc.

If you want to know what parameter user has passed in your report, you can add the following expression as field in your query.

Create an expression of type Date in left hand side Under Expressions.
Type
Default Date
Expression
Field
Current Date
decode(:1,'1900-01-01',to_char(trunc(sysdate),'YYYY-MM-DD') ,:1)

Current Date - 1
decode(:1,'1900-01-01',to_char((trunc(sysdate)-1),'YYYY-MM-DD') ,:1)

Current Date + 1
decode(:1,'1900-01-01',to_char((trunc(sysdate)+1),'YYYY-MM-DD') ,:1)

I have tested this on Oracle 9.2.0.8 and PeopleTools 8.48.12.

ORA-00022: invalid session ID; access denied

If you are getting this error, here is a quick fix.

Set the following value in psappsrv.cfg (appserver) and psprcs.cfg (batch server) for all the configured appservers and batch servers. You may have to reconfigure the appserver and batch servers and restart them.
DbFlags=8


Default value is DbFlags=0 which means use Persistent Secondary DB Connection.
Setting DbFlags=4 is not recommended by PeopleSoft, which completely disables the secondary database connection.
Setting it to 8 disables Persistent Secondary DB Connection, but it still uses on demand Secondary DB Connection for each request. This is required for using GetNextNumberWithGapsCommit (GNNWGC) function, which is internally used by PeopleSoft for workflow transactions to generate APPR_INSTANCE
If you do not do this, you may get row inserted in PS_APPR_INST_LOG with APPR_INSTANCE = which may cause, some undesired workflow routings.

The easiest solution I have found is
delete from ps_appr_inst_log where APPR_INSTANCE = 0


Please make sure that you backup the data and test it.

Monday, 21 July 2014

Synchronous App Message Error Status SQL


If you have turned on Logging in your Service Operations -> Routings, you can run these sql statements to get the Error details.

  • select * from psibloghdr where STATUSSTRING = 'ERROR' order by PUBLISHTIMESTAMP desc
  • select * from psiblogerr order by ERRORTIMESTAMP desc
  • select * from psiblogerrp order by ERRORTIMESTAMP desc

To see the explanation for message no., Run

  • select * from PSMSGCATDEFN where message_set_nbr = 158 and message_nbr = :1

You can see this information from online page


PeopleTools -> Integration Broker -> Service Operations Monitor -> Synchronous Services