PeopleSoft Component PreBuild Event

Your rating: None Average: 5 (2 votes)

Things to know about Component PreBuild Event PeopleCode:

  • PreBuild executes only once during the component build process.
  • PreBuild is often used to hide or unhide pages.
  • It can be used to set global or component scope variables.
  • PreBuild can only be placed on the component.
  • Do not place errors or warnings in PreBuild.

The code below populates the OPRDEFNDESC field if it is empty:

Declare Function GetUserDescr PeopleCode FUNCLIB_PTSEC.OPRID FieldFormula;

rem set name;
PSUSERPRFL_WRK.TEXT254 = PSUSRSELF_SRCH.OPRDEFNDESC;
rem If no desc, try GetUserDescr function
if None(PSUSERPRFL_WRK.TEXT254) Then
PSUSERPRFL_WRK.TEXT254 = GetUserDesc(%UserId);
End-if;
rem as a last resort user UserId as description
if None(PSUSERPRFL_WRK.TEXT254) Then
PSUSERPRFL_WRK.TEXT254 = %UserId;
End-if;

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
Ashok's picture
Ashok (not verified)
Re: Calculate the sum for a grid field with out using row count

Hi All!!Can any one tell me how can we write a people code to Calculate the sum for a grid field with out using row count but using Component Variables.

Lepa's picture
User offline. Last seen 8 weeks 6 days ago. Offline
Joined: 06/23/2008
Posts: 591
Re: PeopleSoft Component PreBuild Event

Same question has been posted on the forum. Please post any followups you have on the forum.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog