Showing posts with label PeopleSoft. Show all posts
Showing posts with label PeopleSoft. Show all posts

How to read a field from a CSV file in to a PeopleSoft record (not in order) using File Layout

How to read a field from a CSV file in to a PeopleSoft record (not in order) using File Layout
If you want to read a csv file to PeopleSoft record in a sequential order you can use the following code to do that.
Local File &MYFILE;
Local Record &REC;
Local array of string &ARRAY;
Local string &STRING

&MYFILE = GetFile("c:\temp\vendor.csv", "R", %FilePath_Absolute);
&REC = CreateRecord(RECORD.MY_TEST_RECORD);
&ARRAY = CreateArrayRept("", 0);

If &MYFILE.IsOpen Then
   If &MYFILE.SetFileLayout(FILELAYOUT.MY_TEST_FILELAYOUT) Then
      While &MYFILE.ReadLine(&STRING);
         &ARRAY = Split(&STRING, ",");
         For &I = 1 To &REC.FieldCount
            &REC.GetField(&I).Value = &ARRAY[&I];
         End-For;
      /* do additional processing here for converting values */
         &REC.Insert();
      End-While;
   Else
      /* do error processing - filelayout not correct */
   End-If;
Else
   /* do error processing - file not open */
End-If;

&MYFILE.Close();

However, let's assume that you want to read a particular field or few fields from a CSV file to a PeopleSoft record. Then you can use another version of the above code. Here we can use an array object to store all the fields from the CSV and then you can use array index to find the particular field you are looking. Then, you can use SQLExec to insert or update that PS record you want.
Local File &MYFILE;
Local Record &REC;
Local array of string &ARRAY;
Local string &STRING
Local string &2ndFieldFromCSV

&MYFILE = GetFile("c:\temp\vendor.csv", "R", %FilePath_Absolute);
&REC = CreateRecord(RECORD.MY_TEST_RECORD);
&ARRAY = CreateArrayRept("", 0);

If &MYFILE.IsOpen Then
   If &MYFILE.SetFileLayout(FILELAYOUT.MY_TEST_FILELAYOUT) Then
      While &MYFILE.ReadLine(&STRING);
         &ARRAY = Split(&STRING, ",");
   /* lets assume that you want 2nd field from the csv file*/
          &2ndFieldFromCSV = &ARRAY[2];

      /* do additional processing here insert, update etc.. */
         SQLExec("UPDATE PS_MY_TABLE SET FIELD2 = &2ndFieldFromCSV WHERE PK_FIELD1 = 'SOME VALUE') ;
      End-While;
   Else
      /* do error processing - filelayout not correct */
   End-If;
Else
   /* do error processing - file not open */
End-If;

&MYFILE.Close();

Obviously, there are many ways to do the same thing in many different ways. But, leaveraging PeopleSoft File Layouts do the job will be much easier.


Become Awsome in PeopleSoft with these PeopleSoft Books

If you want to become awesome in PeopleSoft and want to take your PeopleSoft skills to the next level grab these awesome PeopleSoft books from PeopleSoft Tutorial.
Simply follow the links below;
  • PEOPLESOFT UPDATE MANAGER Buy Now
  • CREATE PEOPLESOFT REMOTE LAB Buy Now

How to Improve Interpersonal Skils in PeopleSoft Project Management

Whether you are a seasoned PeopleSoft Developer or Guru, or even an expert in PeopleSoft suite of technologies you have to deal with People all the time. Having good knowledge and understanding of stakeholders around you is inevitable in order to gain trust, mutual understanding and ultimately to achieve success in your PeopleSoft project. Here I'm going to list some of the most common interpersonal skills that you may need to enhance in your PeopleSoft career. This is a very short list so feel free to add any thoughts as a comment so that other visitors of this blog can get a value from it.

Interpersonal Skills in (PeopleSoft) Project Management [1]

Well developed technical, interpersonal and conceptual skills help to analyses the situation and interact appropriately.



1. Leadership

Leadership is an ability get things done through others. Respect and trust are the key elements of effective leadership. This is critical in beginning of the project which use to emphasis and communicate the vision and motivating and inspiring project participants to achieve high performance.

2. Team Building

Team building is the result of good leadership and team building is teamwork.

3. Motivation

Overall success of the project depends on the project team's commitment, which is directly related to motivation. Motivational factors in a project/team environment.
  • Self-satisfaction
  • Job satisfaction
  • Challenging work
  • A sense of accomplishment
  • Achievement and growth
  • Money
  • Other rewards and recognition

4. Communication

Single biggest reason for project success and failure. Effective communication and Openness in communication is a gateway to teamwork and high performance. It improves relationships among team members and create mutual trust.
Effective communication involves awareness of communication style, parties, cultural issues, relationships, personalities, and overall context of the situation.
Active and Effective Listening is a big part in good communication.

5. Influencing

According to [2] influencing is the power to change or affect someone or something. In project management Influencing is important to get things done through others in positive manner.

6. Decision Making

Six-Phase Decision making model

7. Political and Cultural Awareness

8. Negotiation

A successful negotiation may include;
  • Analyse the situation
  • Identify Difference between wants and needs - both their and yours
  • Focus on interests and issues
  • Ask for high and offer low but realistic
  • When you make and concession, act if you yield something
  • Make both parties feel they have won, Win-Win negotiation.
  • Active listening and articulating

References

[1] http://www.merriam-webster.com/dictionary/influence

[2]


Where to find www.pscustomizer.com web site

Where to find www.pscustomizer.com web site
http://www.pscustomizer.com/ is a very useful PeopleSoft web site with lot of useful information. One of my favourite is the page page which lists most of the frequently used PeopleTools meta tables. Somehow this web site is no longer be found on the internet (may be they are revamping the site :-) ).
So, if someone wants to access the web site particularly PeopleTools meta table page you can find a cached copy of this web site from this link 

What is PeopleSoft Web Profile

The PeopleSoft web profile contains numerous settings or configuration properties required by the PeopleSoft Internet Architecture running on the web server.

Warning: Modifying of web profile must be handled carefully and with thorough understanding of the web profile configurations. This is a system admin task and modifying web profile properties will affect the web server configurations in your PeopleSoft system.

Following web profiles are delivered within PeopleTools;
  • DEV - The DEV web profile provides basic portal functionality for development, including trace and debug settings that are appropriate for development.
  • TEST - The TEST web profile uses the same settings as the DEV web profile, except that fewer trace and debug properties are enabled.
  • PROD - The PROD web profile uses the settings that are most commonly needed in a production environment that authenticates users.
  • KIOSK - The KIOSK web profile uses the same settings as the PROD web profile, except that public user access is enabled for the Guest user, and all options for storing caching or persistent cookies on the browser are disabled.
To find the web profile in your PeopleSoft system, Navigate to PeopleTools > Web Profile > Web Profile Configuration (Component name: WEB_PROFILE)

Specifying an Initial Web Profile

When your PeopleSoft administrator performs the PeopleSoft Internet Architecture setup procedure for your system he must be specified which web profile will be applied to the portal.
here is an example where you specify web profile in PIA installation.

Pages Used to Configure Web Profiles

How to check PeopleSoft Integration Gateway or Default Node is active

Integration Broker is one of the most important tools in PeopleSoft system which enables us to perform asynchronous and synchronous messaging among internal systems and third-party systems. Integration Broker is a middleware technology and it can;
  • Performs asynchronous and synchronous messaging among internal systems and third-party systems.
  • Exposes PeopleSoft business logic as web services to PeopleSoft and third-party systems.
  • Consumes and invokes web services from third-party and PeopleSoft systems.
PeopleSoft Integration Broker consists of two subsystems: the integration gateway and the integration engine. Main difference between integration gateway and integration engine is that the integration gateway resides on a PeopleSoft web server, and the integration engine is installed on an application server as part of the PeopleSoft application.
This post we will look at how to check that your Integration Gateway and Integration Engine is active. 
For more information on Integration Broker technology please look 

Check Integration Gateway Status

Here we are going to check the status of the integration gateway (which is reside in the web server). 
Login to your PeopleSoft Application and Navigate to Main Menu > PeopleTools > Integration Broker > Configuration > Gateway


Click on the Ping Gateway button to see if the Integration Gateway is up and running. If the gateway is up and running you will see a window a below

Check Default Node Status

In order to enable communication between web server and application server (for inbound traffic) we need to find the default local node of our PeopleSoft Application.
Navigate to PeopleTools > Integration Broker > Integration Setup > Nodes
On the search page, click on the search button to query all the nodes. After that click on the Default
Local Node header of the result grid. The default local node (e.g. PSFT_HR) will now be shown as follows. Then select the default node.


Now that you know the default local node of your Integration Broker. Now Navigate to PeopleTools > Integration Broker > Configuration > Gateway. Then, Click on the link Gateway Setup Properties. In the next screen you have to provide User ID and Password (Please contact your PeopleSoft system administrator if you do not know the User ID and Password).
After you successfully enter the integration gateway security credentials, the PeopleSoft Node Configuration page appears.


Click on Ping Node button for your default local node. If successful the following screen will appear. which means the Integration Gateway can now successfully communicate with the application server.

why these checks are important

This might be useful when you are working with integration broker and if you want to check that gateway and node are active. As an example if you are working with web services and when you want to troubleshoot something then you might want to see whether these component are active in your system.

Quick Introduction to PeopleSoft Web Services

Introduction 

Web Services are getting popular day by day and as developers we are constantly getting requirements to intergrate our PeopleSoft application with thrid-party system to interchange data between systems. In fact PeopleSoft system delivers web services so that we can leverage those web services, extend or create our own web services esaily within our PeopleSoft system. Some examples of PeopleSoft delivered web services are (in Campus Solutions) , List of Values WS, AAWS (Admission Applications Web Services). In addition to the conventional SOAP based web services PeopleSoft now facilitate to develop RESTful web services using PeopleSoft Intergreation Broker.

Web Service Overview

A web service provides external applications a web-services-based means of accessing PeopleSoft data. Web services are implemented through the PeopleTools Integration Broker (IB) framework. The Integration Gateway web application receives all the web service requests and forwards them to the Integration Engine (application server) for processing.

Following process occurs when you use web service with a client application

1. The client application invokes one of the service operations from the API (application programming interface) published by PeopleSoft application.

For example in in Campus Solutions, Admission Applications Web Service contains the following web service operations
  • SAD_ADMISSIONS – Main Admissions Web Service
    • SAD_CREATEAPPL: Create Application
    • SAD_GETAPPL: Find Application
    • SAD_GETAPPLS: Find Applications
    • SAD_SAVEAPPL: Save Application (for later modification or submission)
    • SAD_SUBMITAPPL: Submit Application
    • SAD_GETATTACH: Get Attachment
The service operation SAD_CREATEAPPL is shown below;

2. PeopleSoft Integration Broker receives the service operation request and validates the WS security credentials.

Web services security (WS-Security) is implemented on the integration gateway for inbound and outbound integrations with third-party systems. WS-Security adds a layer of security to sending and receiving service operations by adding a UsernameToken that identifies the sender and authenticates its identity to the web service provider. On inbound processing, PeopleSoft Integration Broker can process requests received from integration partners that contain WS-Security UsernameToken and passwords in the SOAP (Simple Object Access Protocol ) header of the inbound SOAP request. The user name and password should be encrypted via PKI (public key infrastructure).

Some web service operations require a user ID and password. If a user ID and password are not supplied in the SOAP header, Integration Broker rejects the request.
If the request is received from another PeopleSoft system, the user ID associated with the requesting PeopleSoft node is used when the SOAP header does not specify a user name.
When a request is received, PeopleSoft Integration Broker validates the user ID and password in the SOAP header to determine whether the user has the proper security to invoke the service operation requested.

Generally you implement WS security in PeopleSoft via Permission Lists.
in the above screen shot the permission list HCSPSERVICE gives full access to the individual service operations in the SAD_ADMISSIONS WS.
Depending on the requirements, in the service operation level you can specify authentication mechanism so that users who has proper privileges can access to your service operations.

3. The request is passed to Application Server for processing. The Application Server authenticates the service operation and routes it to the respective handler. The handler executes the PeopleCode and sends the response to Integration Gateway.

Handler is basically a application class which has your PeopleCode logic (or business logic) to execute when the service operation is called. handlers can be define in the Handler section in the service operation as follows;

4. Integration Broker sends the response to the client application.

Client application who invoke WS will get XML response message (SOAP based WS). Sometimes client application may get error response messages so that clients can correct and resubmit the WS.
Client application then process this XML response message and present in their Front-end application in a suitable format.

How to determine the time taken to execute your PeopleCode program

Sometime you may have noticed that your PeopleSoft application takes long time to execute and you might get tired of looking at the spinning wheel and thinking of what is going on behind the scenes. This type of performance issues will arise due to many reasons. One reason may be your PeopleCode program logic is not optimised enough so that it takes long time to execute. If you can determine how much time (in other terms algorithmic efficiency) taken to execute your particular program then most probably you can improve you code so that it will reduce processing time of your PeopleCode program. Lets have a look how you can achieve this.
  • You can use the %PerfTime system variable for determining elapsed time. %PerfTime retrieves the local system clock time (of the application server) by making a system call, and the return time is down to the millisecond. Look at the following simple example where you can determine time taken for the particular PeopleCode program segment.
&Start = ​%PerfTime;
   &results = "";
   For &I = 1 To &Count;
      &GnnwgNumber = GetNextNumberWithGapsCommit(QEORDER_DTL.QE_QTY, 999999, 1,⇒
 "where QE_ORDER_NBR='GNNWG'");
      &results = &results | " : " | &GnnwgNumber;
   End-For;
   
   &End = ​%PerfTime;
   &out = "Count = " | &Count | ", total GNNWG time (s) = " | NumberToString⇒
("%6.3", Value(&End - &Start));

PeopleSoft recommends using %PerfTime when measuring performance time for a specific PeopleCode program. This can enable developers to evaluate which coding logic has better performance time.

  • Another option is you can run PeopleSoft SignOn Trace. To get the SignOn tracing options (the signon URL includes the trace directive) In the address bar you can type "http://server:port/psp/ps/?cmd=login&trace=Y". This will show you a page like this. From this page you can specify PeopleCode trace settings. Select Each Statement from Peoplecode Trace Setting and get the trace file generated on your app server. In this trace file you can get the timestamp for each statement in the PeopleCode. 

How to Display a detailed SQL error (Online)

How to Display a detailed SQL error (Online)
Sometimes when you navigate to a PeopleSoft page or while doing some work online you might come up with this error.

"A sql error occurred. Please consult log for Administrator."

As developers when we build and test it is handy if we can see detailed error so that we can rectify it quickly. Sometimes it is not that obvious where the error is coming from even though you build the records, views etc.. Otherwise, you have to get the Appserver logs to find out where the error is coming from.

There is a way you can enable SQL error details so that it will be displayed to the users (in this case developers)

If you want SQL error details to be visible to users, set this property as follows:
Suppress SQL Error=0

This property exists in the PSTOOLS section of the PSAPPSRV.CFG file.

"For security purposes, this option has a default value of 1 to prevent SQL error details from being displayed to users.
Any SQL errors that occur don't display details, but refer users to consult the system log.
The details that were in the SQL message are written to the log file. This helps to prevent SQL injection vulnerabilities."

So, if you want to see the detailed SQL error online, ask your PeopleSoft Sysadmin to change this option in App Server PSAPPSRV.CFG file so that next time you can see the detailed SQL error message.

How to Test Delivered PeopleSoft Web Service using SoapUI

Prerequisites

Download SoapUI from http://www.soapui.org/
SoapUI is an open-source web service testing application for service-oriented architectures (SOA) and representational state transfers (REST).
It's simplicity and easy to use interface allows developers and testers to quickly test PeopleSoft web services without spending too much time of learning about SoapUI.
In this example we are going to look at a delivered web service called List of Values (LOV) web service in PeopleSoft Campus Solutions (CS).

A quick overview of the List of Values Web Service

Suppose you have an online application that presents list of prompt fields to the users.
The list of values retrieved by the service is used to populate drop-down list boxes or prompt fields in an external UI.
The List of Values web service (service operation SCC_GET_LOV) allows an external UI to request a list of prompt or translate values for a field name configured inside the PeopleSoft Campus Solutions database.
Also, the external UI logic can use this retrieved list of values to validate a value that a user enters in a field of the external UI.
As an example assume that you pass valid translate values for possible Phone types for the external UI to display in a Phone Type drop down list so that a valid value can be picked by a user.

The LOV request message (SCC_LOV_REQ message) accepts the following input parameters:
Record Name (required).
Field Name (required).
LOV Context (optional – defined on the List of Values Setup component).

The Get List of Values service operation (SCC_GET_LOV) is called, the external UI nominates the field name and its record for which the service should return the list of values.

So, in this example we will try to get valid phone types from the translate values from PERSONAL_PHONE and the field name PHONE_TYPE (and LOV Context is left blank purposely).

Provide the web service

To provide the web service navigate to PeopleTools > Integration Broker > Web Services > Provide Web Service

In order to generate WSDL (web service description language) for your service, you need to use the Provide Web Service wizard to generate the web service in PeopleSoft.
The service for the List of Values web service is SCC_LOV and the service operation is SCC_GET_LOV.

Step 1

Search for the service SCC_LOV. Select your service and press Next.

Step 2

SCC_LOV service has SCC_GET_LOV service operation. Note that SCC_GET_LOV service operations will have request, response and fault messages associate with it.


Step 3

A WSDL file will be generate for SCC_LOV service. You can view it during this step.


Step 4

The final step is the wizard publishes the WSDL for your web service to the PeopleSoft WSDL reposit


Step 5

The last page will show the confirmation of your results of creating and publishing the WSDL for your web service.
Note down the Generated WSDL URL which will required when you want to create the SOAPUI project.


Create a new SOAP project

Assuming you have already downloaded SoapUI, then Open up your SoapUI instance.
In SoapUI, choose File > New SOAP Project (CTRL + N). Specify the project name, then enter the URL (from step 5) to the WSDL for your web service.


If the project is successfully created then in the left Navigator pane you can see your project and the SOAP Request.


Testing the Web Service

Double-click on the generated request (Request1) and that will open a new request window with a SOAP envelope.
In the generated XML replace the question mark (?) between the ser:FIELDNAME tag and ser:RECORDNAME tag with PHONE_TYPE field and PERSONAL_PHONE record.


For this exercise I'm going to remove Optional sections from the XML as they need to configure for different purposes.
Now my XML request looks like this.


Once you submit this request your response will look like this. Note that all the active Phone Types (Translate values) will be displayed as a CODE/VALUE pair in the response.


Conclusion

In this post we looked at how to quickly test a delivered PeopleSoft web service, List of Values (SCC_LOV) using SoapUI.
List of Values web service is related to PeopleSoft Campus Solutions and this comes handy if someone new to PeopleSoft web service to get a basic idea of how to test a web service.

feel free to send any comments or suggestion!

How to Access PeopleSoft Browser-Based Shortcuts and App Designer Shortcuts

PeopleSoft applications offer set of keyboard shortcuts to interact with your PeopleSoft application more quickly and easily. These shortcuts are classified into two categories: hot keys and access keys.

To get these shortcuts, Navigate to any PeopleSoft online page and press Shift+Ctrl+K key combo.
You will get a printable list of these shortcuts while online.

Application Designer Keyboard Shortcuts

Some of the most useful PeopleSoft Application Designer Keyboard Shortcuts are mentioned at http://www.peoplesoftwiki.com/application-designer-keyboard-shortcuts

PeopleCode Editor Shortcuts




Can we Add Attachments That user to files with names longer than 64 characters in PeopleSoft?

I have seen that some forums developers ask above question often. As delivered by PeopleSoft there are no way (not that I know of) we can add attachments with file name longer than 64 characters. This is a limitation which is coming from AddAttachement peoplesoft built-in function. If you try to attach file with a name longer than 64 characters then you will get a this particular error;
File transfer failed because name of selected file name is too long. Maximum is 64 characters. 

Further, in PeopleBooks that has mentioned as;


Here, UserFileName is the 4th parameter to the AddAttachment function.

How to show a list of restricted file types to the user (based on File Extension List)

In my previous two posts I mentioned that we can use File Extension List to created (or store) a list of file extensions. This File Extension List can be used to reject or accept list of file types for users when uploading files to the PeopleSoft system. To refresh, please read following Posts if you are not sure what the File Extension List is?
How to restrict File Types (extensions) from URL Object Properties When Adding Attachments Part I
How to restrict FileTypes (extensions) from URL Object Properties When Adding Attachments Part II
Sometimes you want to show a message to users to explicitly say that our PeopleSoft system only accept certain list of file types when you doing file attachments. One of the easiest ways to generate this message is to get the list of file types from the File Extension List records. In this post, I assume that you have already created a File Extension List (PeopleTools > Utilities > Administration > File Extension List) and configure it as a URL properties for the file attachment record.

If all the configurations are done then you can access this file extensions by querying the underlying record PTFX_EXTLST.
You can create a PeopleCode function in which you can pass list Name (e.g. MY_TEST_FILE_EXTENSION) to the function dynamically and build the file list as shown in the following example.
/*this function will build the common file extension list for file upload*/
Function MyFileExtensionList(&ExtListName As string) Returns string
   
   Local string &FileExt;
   Local string &FileList = "";;
   Local SQL &FileList;
   rem get the file extension list from PTFX_EXTLST record (File List);
   &FileList = CreateSQL("SELECT DISTINCT A.PTFX_EXT FROM PS_PTFX_EXTLST A WHERE A.PTFX_EXTLST_NAME = :1 ORDER BY 1", &ExtListName);
   
   /*build the file extension list*/
   While &FileList.Fetch(&FileExt)
      &FileList = &FileList | ", " | &FileExt;
   End-While;
   
   &FileList = LTrim(&FileList, ", ");
   
   Return &FileList;   
End-Function;

This way you can show a message to user if they fail to attach a file which are not in this list
/*check the Return code for file extension validation*/
/*Retrun code 21 - "File transfer failed because the file extension is not allowed."*/
   If &numRetCode = 21 Then
      MessageBox(0, "", 0, 0, MyFileExtensionList("MY_TEST_FILE_EXTENSION"), 0);
   Else
/*all good*/
 End-If;

How to find PeopleSoft Project Item (PSPROJECTITEM) Object type list

How to find PeopleSoft Project Item (PSPROJECTITEM) Object type list
When I was searching to find out what are all the distinct OBJECTTYPE values for the PSPROJECTITEM table, I found out there are heaps of excellent posts written in many places. one particular post from https://garrettdieckmann.wordpress.com/2013/12/11/object-types/ has mentioned a table called PS_WHEREUSEDOBJTBL. This table stores the object type in the WHEREUSEDOBJTYPE field. In addition you can find PeopleSoft object types (definition types) in PeopleTools 8.54: Application Designer Developer's Guide - Appendix B.
Altogether there are 120 object types are listed in PeopleTools 8.54: Application Designer Developer's Guide (this is same as PeopleTools 8.53: Application Designer Developer's Guide).

Following SQL Query will show you all the object types in project item table.
Please note this Query is copied from (https://gist.github.com/garrettdieckmann/1978543ed214e05588c8)
select projectname
  , case when objecttype='0' then 'Records'
  when objecttype='1' then 'Indexes'
  when objecttype='2' then 'Fields'
  when objecttype='3' then 'Format definitions'
  when objecttype='4' then 'Translate values'
  when objecttype='5' then 'Pages'
  when objecttype='6' then 'Menus'
  when objecttype='7' then 'Components'
  when objecttype='8' then 'Record PeopleCode'
  when objecttype='9' then 'Menu PeopleCode'
  when objecttype='10' then 'Queries'
  when objecttype='11' then 'Tree structures'
  when objecttype='12' then 'Trees*'
  when objecttype='13' then 'Access groups*'
  when objecttype='14' then 'Colors'
  when objecttype='15' then 'Styles'
  when objecttype='16' then 'Not used'
  when objecttype='17' then 'Business processes'
  when objecttype='18' then 'Activities'
  when objecttype='19' then 'Roles*'
  when objecttype='20' then 'Process definitions'
  when objecttype='21' then 'Process servers'
  when objecttype='22' then 'Process types'
  when objecttype='23' then 'Process jobs'
  when objecttype='24' then 'Process recurrences'
  when objecttype='25' then 'Message catalog entries*'
  when objecttype='26' then 'Dimensions*'
  when objecttype='27' then 'Cube definitions*'
  when objecttype='28' then 'Cube instance definitions*'
  when objecttype='29' then 'Business interlinks'
  when objecttype='30' then 'SQL definitions'
  when objecttype='31' then 'File layout definitions'
  when objecttype='32' then 'Component interfaces'
  when objecttype='33' then 'Application Engine programs'
  when objecttype='34' then 'Application Engine sections'
  when objecttype='35' then 'Message nodes'
  when objecttype='36' then 'Message channels'
  when objecttype='37' then 'Message definitions'
  when objecttype='38' then 'Approval rule sets'
  when objecttype='39' then 'Message PeopleCode'
  when objecttype='40' then 'Subscription PeopleCode'
  when objecttype='41' then 'Not used'
  when objecttype='42' then 'Component interface PeopleCode'
  when objecttype='43' then 'Application engine PeopleCode'
  when objecttype='44' then 'Page PeopleCode'
  when objecttype='45' then 'Page field PeopleCode'
  when objecttype='46' then 'Component PeopleCode'
  when objecttype='47' then 'Component record PeopleCode'
  when objecttype='48' then 'Component record field PeopleCode'
  when objecttype='49' then 'Images'
  when objecttype='50' then 'Style sheets'
  when objecttype='51' then 'HTML'
  when objecttype='52' then 'Not used'
  when objecttype='53' then 'Permission lists'
  when objecttype='54' then 'Portal registry definitions'
  when objecttype='55' then 'Portal registry structures'
  when objecttype='56' then 'URL definitions'
  when objecttype='57' then 'Application Packages'
  when objecttype='58' then 'Application Package PeopleCode'
  when objecttype='59' then 'Portal Registry User homepages'
  when objecttype='60' then 'Problem type definitions'
  when objecttype='61' then 'Archive templates'
  when objecttype='62' then 'XSLT'
  when objecttype='63' then 'Portal Registry User Favorites'
  when objecttype='64' then 'Mobile pages'
  when objecttype='65' then 'Relationships'
  when objecttype='66' then 'Component Interface Property PeopleCode**'
  when objecttype='67' then 'Optimization Models***'
  when objecttype='68' then 'File References***'
  when objecttype='69' then 'File Reference Type Code***'
  when objecttype='70' then 'Archive object definitions***'
  when objecttype='71' then 'Archive Templates (Type 2)***'
  when objecttype='72' then 'Diagnostic Plug-Ins***'
  when objecttype='73' then 'Analytic Models'
  when objecttype='74' then 'Not Used'
  when objecttype='75' then 'Java Portlet User Preferences'
  when objecttype='76' then 'WSRP Remote Producers'
  when objecttype='77' then 'WSRP Remote Portlets'
  when objecttype='78' then 'WSRP Cloned Portlet Handles'
  when objecttype='79' then 'Services'
  when objecttype='80' then 'Service Operations'
  when objecttype='81' then 'Service Operation Handlers'
  when objecttype='82' then 'Service Operation Version'
  when objecttype='83' then 'Service Operation Routings'
  when objecttype='84' then 'IB Queues'
  when objecttype='85' then 'BIP Template Definitions'
  when objecttype='86' then 'BIP Report Definitions'
  when objecttype='87' then 'BIP File Definitions'
  when objecttype='88' then 'BIP Data Source Definitions'
  when objecttype='89' then 'WSDL'
  when objecttype='90' then 'Message Schemas'
  when objecttype='91' then 'Connected Query Definition'
  when objecttype='92' then 'Logical Schemas'
  when objecttype='93' then 'XML Schemas'
  when objecttype='94' then 'Relational Schemas'
  when objecttype='95' then 'Dependency Documents'
  when objecttype='96' then 'Document Schema'
  when objecttype='97' then 'Essbase Cube Dimensions'
  when objecttype='98' then 'Essbase Cube Outlines'
  when objecttype='99' then 'Essbase Cube Connections'
  when objecttype='100' then 'Essbase Cube Templates'
  when objecttype='101' then 'Delimited Schemas'
  when objecttype='102' then 'Positional Schemas'
  when objecttype='103' then 'Application Data Set Definitions'
  when objecttype='104' then 'Test Definitions'
  when objecttype='105' then 'Test Framework Test Cases'
  when objecttype='106' then 'Application Data Set Bindings'
  when objecttype='107' then 'Feed Definitions'
  when objecttype='108' then 'Feed Categories'
  when objecttype='109' then 'Feed Data Type'
  when objecttype='110' then 'JSON Documents'
  when objecttype='111' then 'Related Content Definition'
  when objecttype='112' then 'Related Content Services'
  when objecttype='113' then 'Related Content Configurations'
  when objecttype='114' then 'Related Content Layouts'
  when objecttype='115' then 'Search Attributes'
  when objecttype='116' then 'Search Definitions'
  when objecttype='117' then 'Search Categories'
  when objecttype='118' then 'Search Contexts'
  when objecttype='119' then 'Integration Groups'
 else 'missing type' end object_type
  , objecttype
  , objectvalue1
  , objectvalue2
  , objectvalue3
  , objectvalue4
  from psprojectitem 
  where projectname = '&project_name';

How to use Message Catalog pop-up in PeopleSoft Pages

Popups are common in web pages and they are handy to display additional information about a field or information for a subset of users. For example, you can create a popup to display information about a types of files which are accepting for a file upload process. Another example would be to show a list of restricted characters for a particular field (a password field). In PeopleSoft we can create a special type of page called a pop-up page which are bit different from standard PeopleSoft pages. There are certain restriction when creating pop-up pages. For instance, Pop-up pages support only a subset of page controls (HTML areas, for example cannot add to a Pop-up page).

However, for this post we will look at how to get popup working from message catalog. In this case you do not need to create a Pop-up page. 

Enabling Message Catalog Pop-ups

To enable message catalog pop-ups:
1. Insert a Push button/Hyperlink to the page you want (you can associate pop-up with any other page control which support pop-ups).
2. Double click and access a Push button/Hyperlink properties
3. In Type tab Associate your Push button/Hyperlink to a Destination (e.g PeopleCode, Page Anchor), Record and a field.
4. In label Tab configure properties as you want, example is shown below from PeopleSoft delivered User Profile Page.
 5. In use tab, Mouse Over Popup section select Message catalog Popup and set Message Set and Number.
6. When you follow above basic setup, then you can see the message catalog popup on the page when you Click or Hover the link (or image).
(Note: The text in the Message Text field appears as the pop-up page header. The text in the
Explanation field appears in the pop-up page body.)




How to Know Your PeopleSoft PeopleTools Version (for Beginners)

There are few ways you can check PeopleTools version of your PeopleSoft Application. In this post we will look at most common ways to check the PeopleTools version.

Method 1: Via App Designer

You can check PeopleTools version using app designer, by Clicking Help > About PeopleTools... 

Method 2: Pressing (Ctrl +  J) or (Ctrl + Shift + J) Key combination from brower

The famous (Ctrl +  J) or (Ctrl + Shift + J) Key combination will work for most browsers such as Chrome, FireFox and Internet Explorer

Method 3: Installing Browser Plugging (PSChrome) for Chrome and FireFox.

PS: When you upgrade Firefox to version 36.0.1 PSChrome for Firefox will not work.

Method 4: Using PSPCMPROG record

Last but not least, you can query the delivered record PSPCMPROG record which store all PeopleCode programs. Simply issue this Query;
SELECT PTTOOLSREL FROM PSPCMPROG;

How to Compile your PeopleCode Program

In PeopleTools App Designer there is an option to compile all PeopleCode programs which are stored in the database or in a project to check for errors. When you do that it compile every PeopleCode program. Apart from finding errors in the program, one advantage of compiling the program through App Designer is after an upgrade to verify that all the programs were upgraded correctly.
To access this option in App Designer, go to Tools menu and select Compile All PeopleCode option.



To compile all PeopleCode programs

Open Application Designer while accessing the database that contains the PeopleCode that you want to check, then Select Tools, Compile All PeopleCode. Select which PeopleCode to compile. Click Compile in the Compile All PeopleCode dialog box. If there are any errors they will appear in the PeopleCode log display window.



Important PeopleSoft Queries Part I

Important PeopleSoft Queries Part I

Some of the PeopleSoft PeopleTools Queries that someone might find useful;

How to find database tables (i.e SQL records) attached to a page?

SELECT A.LBLTEXT, A.RECNAME, A.FIELDNAME, A.PNLNAME
FROM PSPNLFIELD A
WHERE A,PNLNAME = :1 --Page Name
AND A.RECNAME NOT LIKE '%XLAT%'
AND A.RECNAME NOT LIKE '%WRK%'
AND A.RECNAME NOT LIKE '%DERIVED%'
AND A.FIELDNAME <> ' '
ORDER BY 2;

How to find objectownerid of a record definition?

SELECT A.RECNAME, A.RECDESCR, A.OBJECTOWNERID, A.DESCRLONG
FROM PSRECDEFN A
WHERE A.RECNAME = :1 --Record Name

How to find list of record definitions (tables) the belong to a particular object owner ?

SELECT A.RECNAME, A.RECDESCR, A.OBJECTOWNERID, A.DESCRLONG
FROM PSRECDEFN A
WHERE A.OBJECTOWNERID= :1 --Object owner id

How to find PS Queries that select data from specific table

SELECT A.OPRID, A.QRYNAME, A.RECNAME, A.FIELDNAME
FROM PSQRYFIELD A
WHERE A.RECNAME LIKE :1 -- Record Name

How to find PS Queries that use specific field

SELECT A.OPRID, A.QRYNAME, A.RECNAME, A.FIELDNAME
FROM PSQRYFIELD A
WHERE A.FIELDNAME LIKE :1 -- Field Name

How to find Queries that were not delivered by PeopleSoft

SELECT A.OPRID, A.QRYNAME, A.DESCR
FROM PSQRYDEFN A
WHERE A.LASTUPDOPRID <> 'PPLSOFT'

How to restrict FileTypes (extensions) from URL Object Properties When Adding Attachments Part II

So, as I mentioned in  How to restrict File Types (extensions) from URL Object Properties When Adding Attachments Part I post, I have tested this particular configuration when adding attachments.
The good news is it worked :-)
So, how did it exactly work?
Well, assuming that you have configured a File Extension list and added a list of accepted or rejected file types to that list as per my previous post. Once done you are ready to go and check whether it is working.
As per AddAttachment PeopleCode function, once the file is uploaded you can check the return code which is either an integer or a constant value. Then you can check the return code "21" which is to check the File Extension from the File Extension list that you have configured.

So basically you can try out a code similar to,
/*check the Return code for file extension validation*/
/*Retrun code 21 - "File transfer failed because the file extension is not allowed*/
&RETCODE = AddAttachment("URL.MYTESTRECORD", &ATTACHSYSFILENAME, "", &ATTACHUSERFILE, 0);
   If &RETCODE = 21 Then
      Error MsgGet(12345, 5, "File transfer failed because the file extension is not allowed");
Else
/*Do something*/
End-if;

How to Find the Record Type of a Record in PeopleSoft

How to Find the Record Type of a Record in PeopleSoft
This simple SQL will show you how to find basic information about a record type.
SELECT RECNAME,
DECODE (RECTYPE,
     0, 'SQL Table',
     1, 'SQL View',
     2, 'Derived',
     3, 'Sub Record',
     5, 'Dynamic View',
     6, 'Query View',
     7, 'Temporary Table',
     'Unknown') As RecordType,
RECDESCR,
PARENTRECNAME,
AUDITRECNAME
FROM PSRECDEFN WHERE RECNAME = 'ACAD_PROG'; --Record Name