Tuesday, March 8, 2011

Pre build Vs Post build event


It's very common to see people have doubts over the difference b/w these 2 events. Both of them seem to be used to either hide pages or declare component variable.
The main difference really is that PreBuild fires before any peoplecode code event on all the rows and fields in the component such as FieldDefault and RowInit. During the PreBuild event there will not be any data in the component buffer structure other than the search record as it's executing prior to the component build process.That's why it's called PreBuild - Pre means "before".

PostBuild runs after that.
During the PostBuild event you will have access to the data read from the database into the component buffer structure.
That's why it's called PostBuild - Post means "after".
Pre build and post build are most commonly used to hide or unhide pages.Don't get hung up on the fact the both hide/unhide pages. Many PeopleCode functions can be used in more than one event.


No comments:

Post a Comment