Archive for December, 2011


DeleteEnabled Property in PeopleSoft

DeleteEnabled Property determines whether a rowset allows rows to be deleted or row can be deleted .

This property takes a Boolean value.

Example PeopleCode:
Local Rowset &rs;
&rs = GetLevel0()(1).GetRowset(Scroll.scroll_table);
For &i = 1  To &rs.ActiveRowCount
     &rs.GetRow(&i).deletenabled = false;
End-For;

 
Note:
This property works with Rowset and Row classes.

The %EffDtCheck construct expands into an effective date subquery suitable for a Where clause. The value for as_of_date is automatically wrapped in %DateIn unless as_of_date is already wrapped in %DateIn or refers to other database columns.

Syntax
%EffDtCheck(recordname [correlation_id1], correlation_id2, as_of_date)

Example:
The following example uses correlation IDs:
SELECT A.DEPTID
FROM PS_DEPT_TBL A
WHERE
%EffDtCheck(DEPT_TBL B, A, %CurrentDateIn)
AND A.EFF_STATUS = ‘A’

This example code resolves into the following:
SELECT A.DEPTID
FROM PS_DEPT_TBL A
WHERE
A.EFFDT = 
(SELECT MAX(B.EFFDT)
FROM DEPT_TBL B
WHERE
A.SETID = B.SETID
AND A.DEPTID = B.DEPTID
AND B.EFFDT <=%CurrentDateIn)
AND A.EFF_STATUS = ‘A’

It looks to be a very smart solution!!!

Every page has an Activate event associated with it which gets fired every time the page gets activated. The page activate event is usually used for security validations that include hiding / displaying objects on the page. Say, if we want a grid to be displayed only when this page is called from a particular component then, the code for it can be written in this event.

This event is valid for Standard and Secondary pages only. It doesn’t apply for sub pages.

It is also used to achieve different kinds of processing based on different Component Builds. Say, we need the page to behave differently in Add Mode and Update Mode, we can specify it here.

To optimize processing of a Component interface peoplecode we can use ItemByKeys method. In some programs we might need to traverse across all the collections to determine where to insert our new row.
By using this method we can minimize the traversing and decrease the processing time. Certainly this will help where the number of rows which need to process are huge.

ItemByKeys

Syntax

ItemByKeys(Key1,Key2…) 

Description

The ItemByKeys method returns the item specified by the parameters. The number and type of keys are unique to each specific collection.

Example PeopleCode:

 &oHjpmJpmPersonProfileSrv = &oSession.GetCompIntfc(CompIntfc.HJPM_JPM_PERSON_PROFILE_SRV);
 &oJpmJpCatTypeCollection = &oHjpmJpmPersonProfileSrv.JPM_JP_CAT_TYPE;
 &oJpmJpCatType = &oJpmJpCatTypeCollection.ItemByKeys(“COMPETENCY”);

There was several solutions to find the navigation path for component and page. There were several SQL statements for different databases. Finally Oracle as developed page this purpose.
 
Search is possible from two navigations using name of Component,Page,Secondary Page and Content Reference.
 
1) Main Menu > Enterprise Components > Find Object Navigation
2) Setup HRMS > System Administration > Utilites > Portal Navigation Path
 
Search works fine with hidden components as well.
 
I found it to be really usefull.