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.

 

No comments: