CoinHive

Monday, January 8, 2018

Apex copy page does not change items consistently

Being able to copy a whole page with all its items, region, processes and logic with just a few clicks is just awesome right? Today I was confronted with an inconsistency (could be either a bug or a feature) in Apex 4.2.

When you copy a page, Apex copies and renames all the items. An item :P1_NAME on page 1 will be copied to page 2 and named :P2_NAME  and so on. A cool feature is that processes are copied too and whenever a page item is referenced in a page process, the copied process will reference the corresponding copied page item.

Our development team often uses this copy functionality, either to back up a page or to test some implementations. What we found today is that in the case of conditions, Apex does not change the items, as you would expect it too. In our case specifically, we have a report on a page with one conditional column. The column was rendered only if a page item had a specific value.
For example:
On page 1, region Employees, column Salary should only be rendered when item :P1_SALARY_VISIBLE has a value 'Y'. After copying this page to page 2, you would expect that the condition on column Salary would reference :P2_SALARY_VISIBLE, but it does not. It still references the item on Page 1.

I should test if it still happens in Apex 5, but I'm already tired of finding this bug.

No comments:

Post a Comment