1

I'm trying to update Display Only page item with a dynamic action on one select lists and want to display the value in that display only item.

My code works and page item gets set but once I try to submit the page I get an error: Session state protection violation: This may be caused by manual alteration of protected page item P1_TEST_ITEM. If you are unsure what caused this error, please contact the application administrator for assistance.

I know for hidden items I can just turn off the Value Protected but that is different for Display Only page items as there is no option to turn off value protected. How can I fix the issue?

Coding Duchess
  • 6,445
  • 20
  • 113
  • 209

3 Answers3

3

There is a doc on MOS (1461271.1) explaining this is expected behavior since apex 4.1.1 Here are some workarounds

  • Define item as text
  • Set Advanced > Custom Attributes to readonly OR Advanced > CSS Classes to apex_disabled

Alternatively, if you want to use Read Only, then you could use a computation on page submit instead of a dynamic action.

Koen Lostrie
  • 14,938
  • 2
  • 13
  • 19
0

Simply turn off "Send On Page Submit" under settings of that item and it should work.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 14 '22 at 05:13
0

Another approach is to turn off "Send on Submit" - but if the field is display only and must be submited - then create a hidden item to hold the value and submit that.

pj.
  • 459
  • 3
  • 6