Friday, November 11, 2016

No Matching Buffer Error - Orphaned Data


I recently came across an issue where I tried accessing a component and received an error stating

No matching buffer found for level. (15,26)

This was because orphan data existed.  I had updated an sqr to delete data from a sql table that was a parent table.  This parent table had child tables.  Since I did not delete the related data from the child tables too the data didn't match up between the levels. 



So what I learned from this was to check if a parent record has child records when deleting data.  A query that identifies child records is shown below:

SELECT * FROM PSRECDEFN WHERE PARENTRECNAME = {tablename};

A query for pulling the orphaned data from the child table is shown below:

select * FROM {child_record}  A
WHERE NOT EXISTS
(SELECT 'x' FROM {parent_record} B 

WHERE A.{key_field}=B.{key_field});

Oracle has some related documentation online.  I believe they have a delivered component that can clean up orphan data from batch processes.

Friday, October 7, 2016

Sorting by Grid Column Header Disables Sort() Function

If a Grid column header is selected any further actions with peoplecode using the Sort() function will be rendered useless.  This is assuming you have column sorting enabled.  Basically what happens is it marks the grid as being sorted.  I have not found a way to reset/change this value.  This can be checked with debugging using the IsUserSorted(GridName) function.   





One option is to disable the Allow Column Sorting option.  To access this pull up the page, right click on the Grid and select Page Field Properties.  In the Grid Properties pop up select the Use tab and uncheck the Allow Column Sorting check box.





The best development work around I could find without using brute force can be found at the link below.  If anyone has any other possible approaches feel free to mention them in the Comments section.

http://technoeureka.blogspot.com/2015/01/peoplesoft-isusersorted-example-with.html

Friday, September 16, 2016

Message Catalogs

There is more than one way to migrate a Message Catalog definition.

The easiest way is via App Designer by inserting into a project:



But another way is by using data mover scripts.

Message Catalog data is stored in the following sql tables:

PSMSGSETDEFN
PSMSGCATDEFN 
PSMSGSETLANG
PSMSGCATLANG

Searching for Portal Registry Structures (CREFs)



One useful delivered component is the View Menu Item Detail.  With this you can search for a CREF if you know part of the Name or Label.  This component will tell you who can access the CREF, it's menu path and it's component.
Menu Path: 
Main Menu -- PeopleTools -- Portal -- View Menu Item Detail




Another way to search for CREF data is using the database.  The delivered PSPRSMDEFN table contains all sorts of data related to CREFs.

SQL Table:  PSPRSMDEFN

The PORTAL_REFTYPE field will always contain a value of 'C' for Content or 'F' for Folder.

If the URL type of the CREF is 'Peoplesoft Component'  the Component and Menu will be stored in the PORTAL_URI_SEG1 and PORTAL_URI_SEG2 fields, respectively.

If the URL type of the CREF is a Peoplesoft Script then the Record, Field and IScript name will be stored in the PORTAL_URI_SEG1, PORTAL_URI_SEG2 and PORTAL_URI_SEG4 fields respectively.
My First Blog Post