Search code examples
eventspeoplesoft

Peoplesoft Peoplecode events


i am new to Peoplesoft software and the PeopleCode programming. I have been doing alot of exercises with PeopleCode. I have a question whereby the record fields events such as FieldDefault and etc etc....

I have made an application whereby user can search and add new value. So in a case where I have Peoplecode in one of the event for example SaveEdit, when I click the save button in both cases of search data or adding new value tab, it points to the same PeopleCode.

Is there any method whereby the code will know when user are searching existing data or adding value or rows in PeopleSoft?

Wont it be conflicting for both cases to point to the same PeopleCode?

Another question:

Hi i have a question regarding the passing of variables between the FieldFormula event and SavePostChange.

I have some values being calculated in the FieldFormula and I want to access it in SavePostChange event as I want to prompt messagebox based on the value being calculated.

I have been using the Global variables to access the variables.

Is there any good way to pass the variables or access to the variables values?


Solution

  • In the case of search records, there are a couple of Search-specific events, SearchInit and SearchSave. SaveEdit is when the record is saving so it shouldn't have a conflict with Searchevents.

    Additionally you can place code either in the Record PeopleCode (fires every time someone uses that Record in a Component) or in Component Record PeopleCode (just that component). Record PeopleCode fires first then Component Record PeopleCode. The Component PeopleCode also has additional events that the record level ones don't, like SavePreChange and SavePostChange. So once you get the hang who fires when you can get pretty granular control of the various events.

    There is actually a pretty good summary in the PeopleBooks here.