No announcement yet.

Showing and hiding fields.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Showing and hiding fields.

    I have some code in onLoad which shows/hides various fields depending on what type of record I am working on.

    This works fine.

    I also have some code in onValidate which checks for various conditions and outputs and error message and exits if necessary.

    And this works.

    If I hit the SAVE button when I am on a record that shouldn't be updated, I get the error message, and the display is fine.

    If I hit the DELETE button, when I am on a record that shouldn't be deleted, I get a Javascript prompt to confirm the delete, and then I get the error message from the onValidate.

    The problem is that the screen that is returned after the DELETE fails shows all the fields in their default setting (none of the fields that were hidden are still hidden).

    Any ideas what is going wrong? I tired to copy the onLoad into onRefresh also, but that did not change the behavior.

    Thanks... Nick

  • #2
    This is a known 'feature'. The trick is that you do a sc_redir to the same application. In the onload you can apply the conditions agian.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /