Component Interface EditHistoryItems Gotcha

By Chris Malek | Wed, Sep 14, 2011

When you are writing code against a Component Interface API, there is an important boolean property on the CI called EditHistoryItems. Because a Component Interface will mimic the online logic as if a user were actually keying the data into the page there is a direct relationship between the Component Interface EditHistoryItems property and the “correct history mode” in the online component accessed via a web browser.

When you set “EditHistoryItems = True”, that is the same as entering a component in “Correct History.” This only really matters for components that have and EFFDT field as part of one of the records keys. If EFFDT is not part of the key structure then, correction history/editHistoryItems serves no purpose.

If you have EFFDT in they key structure and you enter a component in “Correct History” mode, it will allow you to change data that is dated in the past. Hence, the “correct history” nomenclature. If you try to correct past data and you are not in correct history mode, you will see an error in your web browser and the data will not be saved.

This is not the behavior when working with Component Interface. If your programmatic code tries to correct some history in the CI and you set EditHistoryItems = False, it will fail silently when trying to update the field property. So let’s say your code tries to make a change to some historical value on a field/CI property called DESCR and EditHistoryItems = False. The CI will just not take the value. I have seen that it just “silently” fails with no indication that you tried to correct history but were not in the correct mode.

I saw this behaviour on 8.50. So make sure you do some testing in your code to determine if your code should be in correct history/editHistoryMode. It really depends on what your code is trying to do. Generally, it is frowned upon to update history but there are exceptions to this.

Article Categories
Author Info
Chris Malek

Chris Malek is a PeopleTools® Technical Consultant with two decades of experience working on PeopleSoft enterprise software projects. He is available for consulting engagements.

About Chris Work with Chris
Looking for pain-free PeopleSoft web services? 😀
PeopleSoft Simple Web Services (SWS)

Introducing a small but powerful PeopleSoft bolt-on that makes web services very easy. If you have a SQL statement, you can turn that into a web service in PeopleSoft in a few minutes.

Book
Integration Broker - The Missing Manual

I am in the process of writing a book called "Integration Broker - The Missing Manual" that you can read online.