We need to insert a row into a custom table each time our customer views a view-only page. In which event should this occur? I've tried several and have gotten errors. We are running PeopleSoft 8.9, PeopleTools 8.49, Oracle DB.
On: 1274386344|%e %b %Y, %H:%M %Z|agohover
Number of posts: 5
RSS: New posts
How are you doing the insert? A couple potabilities come to mind.
1. Component peoplecode: You can set to PreBuild or PostBuild and should only get fired once each time you load the component.
2. Page peoplecode: Fires every time the page is shown so if this is a tab on a component it could get fired often.
We're attempting the insert with an SQLExec. In Production, the statement works fine in the PostBuild component event. Then we changed to Oracle in our Pre-prod environment and now I get the "can't do this in this event" error. I get the same error on the page Activate event. Argh.
Are you using a different database in your production/pre-production compared to your development environment? I don't think that this should be an issue but you never know. I'd suggest clearing your app server cache after moving your project just to confirm there isn't some old code in there. I'm at a loss if the database makes a difference. The fact that it worked in your development environment means it should work. Also confirm your code looks the same in this new system where you are getting the error.
Sorry; what I should have said above is that we are using Informix in Prod and the statement works fine in the PostBuild event; now in Oracle I get the "can't do it in this event" error….