Skip to Content
author's profile photo
Former Member

User Defined Folder on System Form changing form mode

I've added an extra folder (tab) to the Item Master Data system screen. Every time the user clicks it the form mode changes from "OK" to "Update", and if they try to move to a different record they get the message "Changes will cause the data to be deleted", even though they haven't changed anything.

The folder is added through code and AffectsFormMode is set to false.

The only code actions I carry out when the folder is clicked is to set the forms panelevel, but even if I comment this code out then I still get the problem. If I set BubbleEvent to false then the form mode doesn't change, but the folder doesn't appear "selected" either.

Any suggestions on where I'm going wrong?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 30, 2005 at 06:41 AM

    Hi Jon,

    I use to have the same problem. It use to happen becouse of this:

    Inside the folder there were some other controls, where I write values when the folder was clicked (they were only for reading, but need to initialize them "on the fly"). This controls AffectsFormMode was set to true.

    Changing this property for the controls inside the folder fixed the problem.

    Is this your case too?

    Regards,

    Ibai Peñ

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 30, 2005 at 06:34 AM

    Hi Jon,

    I have had this problem in SBO if you have a formatted search where the Automatically refresh settings are set to "Refresh Regularly". Sometimes it happens that it automatically refreshes a value when you scroll to the record and thinks the form should be updated.

    I don't know if this is your problem, but hope it helps a bit at least.

    Regards,

    Adele

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2005 at 07:02 AM

    The following test-code does not change the formmode... Are you sure its not some other item that does it?

    //In itemEvent
    if(pVal.FormTypeEx=="150") {
      if(pVal.EventType == BoEventTypes.et_FORM_LOAD && pVal.BeforeAction) {
        EventForm.Folders.Add("testUID","testCaption","9"); //9 beeing the item details tab UID
      }
    
      if(pVal.ItemUID=="testUID" && pVal.EventType ==   BoEventTypes.et_ITEM_PRESSED) {
        EventForm.PaneLevel = 42;
      }
    }
    

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Ankush Vachher

      Found the problem. The folder contained a matrix that displayed information about the item. Setting the AffectsFormMode to false for the matrix fixed the problem.

      What I don't understand is why this was a problem, as the matrix was populated when the record changed, not when the tab was clicked (so why didn't the form mode change when the matrix was populated, rather than when it was displayed?)

      Thanks to everyone for their help!