How to Implement Component Interface in peoplesoft

How to Implement Component Interface in peoplesoft
General points to implement Component Interface and understand the component/page structure.

1) create the component interface.

2) always accept the default loading fields structure.

3) remove the unwanted fields from CI.

4) provide necessary access to CI – permissionlist.

5) test your CI, if any update/insert you do CI returns 1 if it success and ˜0 for failed.

6) arrange the fields as per the page design/ tab order.

7) set get history items to true.

8) Set interactive mode to true. Note this setting affect the performance. It should be used only for testing purpose.

9) pass the key field values.

10) Check the prompts if dynamic prompts are being used on the page. if yes make sure to check the values against these tables.

11) check if any prompts are being used on the page.

12) Put a validation for prompts before passing to CI. Most of the cases we may receive invalid values in prompt.

13) log into error tables if any invalid prompt values found.

14) at child level > set the collection properties insertitem/item.

15) If collection item count is more than one then set to insertitem else item. for first row always property as item .

16) Insert item > just like clicking on + button.

17) enable the save and cancel methods.

18) Do not use save/cancel methods inside the loop. It may lead failure of your program.

19) Always use rowset/arrays for looping the rows, avoid using createsql’s .

20) Always set ignore property (if any error found it will skip that row and process the next row).

21) Set Commit at the end of the step and inside the save method.

22) make sure your CI session is active.

23) finally test your CI thru App Designer.


Folder Creation from SQR

Folder Creation from SQR
If a folder has to be created from a SQR then we can use call system to accomplish this. Let us say if MyFolder is what needs to be created in 'C' drive.

Then follow the code snippet below:

Let $folder = 'C:\MyFolder'
Let $cmd = 'mkdir ' $folder
call system using $cmd #status

Call Sections through PeopleCode in Application Engine

Call Sections through PeopleCode in Application Engine
Syntax for calling Sections through PeopleCode in Application Engine

/*This code is used to call different section in Application Engine based on conditions*/


If (RecordName.FieldName= " ") And
      (RecordName.FieldName = 0) Then
   RecordName.AE_SECTION = "Something";
End-If;

If (RecordName.FieldName <> " ") And
      (RecordName.FieldName = 0) Then
   RecordName.AE_SECTION = "Something";
End-If;

If (RecordName.FieldName = " ") And
      (RecordName.FieldName <> 0) Then
   
   RecordName.AE_SECTION = "Something";
End-If;
If (RecordName.FieldName <> " ") And
      (RecordName.FieldName<> 0) Then
   RecordName.AE_SECTION = "Something";
End-If;

How To release Temp table locks in Peoplesoft

How To release Temp table locks in Peoplesoft
The instacnce need to be deleted from PS_AERUNCONTROL , PS_AETEMPTBLMGR, AERUNCONTROLPC.
PS_AETEMPTBLMGR controls the temp table locks. Also peoplesoft delivered Application engine AECLEANUP can also be used.

DELETE FROM PS_AETEMPTBLMGR WHERE PROCESS_INSTANCE = :1;
DELETE FROM PS_AERUNCONTROL WHERE PROCESS_INSTANCE = :1;
DELETE FROM PS_AERUNCONTROLPC WHERE PROCESS_INSTANCE = :1;

How to Hide Group Boxes on Peoplesoft Pages

How to Hide Group Boxes on Peoplesoft Pages

If the requirement is to selectively display group box in case a particular condition is true or in case for a particular employee or role, you can display the group box by the below code:

if ASGN_VW.EMPLID = "101" Then 
DERIVED_HR.AB_PLAN_GRPBOX.Visible = False; 
Else 
DERIVED_HR.AB_PLAN_GRPBOX.Visible = True; 
End-If;