Showing posts with label PeopleCode. Show all posts
Showing posts with label PeopleCode. Show all posts

Tuesday, September 23, 2008

Frustrating CI Issue PSBusComp error

I've been having an issue when connecting to a CI (peopleTools 8.49.11) in that as I start working with a component and iterating through data to dump in, there seems to be a point where the OS kills the process that I am using.

Here is what I am doing:

Pulling the rows to insert directly from the DB
Connecting to a CI via JSL to the App server
Start the Loop to pump the data in
The first rows go in well
The the App server kills the run after 1 or two rows
Session is reset

I have interactive mode off, get and edit history are also off.
It seems to be specific to this component, or component type (the size?). Our Admins tell me it is a segmentation falt and the process is killed by the OS. Thanks Mr. OS! :)

There doesn't seem to be any Cobol or really intensive people code. Technically this shouldn't matter as interactive mode is turned off and I don't get to the point of saving, so it should be triggered.

I don't know if it matters, but I am going to check to see if 'Expert Entry' is enabled on the user that is connecting to the app server.

More to come....

Thursday, September 18, 2008

PeopleSoft: Stop Save of a page from PeopleCode

For some reason I had an issue figuring out how to stop the saving of a page… Then I was doing something completely unrelated and said, “DUH!!!”

 

To stop a save during validation in PeopleCode throw an error… Use only in the SaveEdit event. Don’t use it in FieldDefault, FieldFormula, RowInit, FieldChange, Prepopup, RowInsert, SavePreChange, or SavePostChange

 

Error  “Some String”;

 

You can use the MsgGet, MsgGetText functions too, if you add your own entries to the catalog.

 

PeopleCode: Change Options in a Drop down List

In PeopleSoft it is “easy” to change the drop down list options on Row-init …

This is from a co-worker. Used to change the options that students see for attendance (for specific class type)

If …… Then

/* Clear the current dropdown
values */
CLASS_ATTENDNCE.ATTEND_REASON.ClearDropDownList();
CLASS_ATTENDNCE.ATTEND_REASON.AddDropDownItem("ALCT", "Allowed
Cut"); CLASS_ATTENDNCE.ATTEND_REASON.AddDropDownItem("CANC",
"Cancelled"); CLASS_ATTENDNCE.ATTEND_REASON.AddDropDownItem("OTHR",
"Absent Other");
CLASS_ATTENDNCE.ATTEND_REASON.AddDropDownItem("PRES", "Present");
CLASS_ATTENDNCE.ATTEND_REASON.AddDropDownItem("SECT", "Second Cut");
CLASS_ATTENDNCE.ATTEND_REASON.AddDropDownItem("SICK", "Sick");

End-If;

Saturday, September 13, 2008

Checking a Peron's Roles within PeopleCode

For manually securing object or doing some kind of filtering, it is regularly useful to know what roles a person has in their user profile. Peoplesoft provides a global variable to give you access to the person’s roles.

Example:

Local array of string &Roles;

Local integer &I;

&Roles = %Roles;
&doTransfer = True;

For &I = &Roles.Len To 1 Step - 1
If &Roles [&I] = "My Special Role" Then
&doTransfer = False;
End-If;
End-For;

Add to Google