Announcement

Collapse
No announcement yet.

Dynamic Logic Ignored for List Views / Mass Update

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic Logic Ignored for List Views / Mass Update

    I have a field on a custom entity that I am making read only via Dynamic Logic when another boolean field is set to true. This works fine on the edit/detail view of the individual record, but I noticed that I can still make edits to the field if I use the mass update functionality of the list view for that entity. Seems like this might be a bug if Dynamic Logic is being ignored but figured I'd bring it up here in case I'm missing anything.

    Thanks for your help.

  • #2
    Dynamic logic is not supported for Mass Update. Remove fields with dynamic logic from mass update field list

    Comment


    • #3
      Thanks Tanya, that's what I've done as a workaround already.

      Please let me know if you fix the issue or have a suggestion of how we can make Dynamic Logic apply to all entity actions. The mass update feature is quite useful, and it's probably not clear to anyone that Dynamic Logic would be ignored there.

      Our real goal here is to not allow editing of a certain field if another is set to true. Is there a way in the beforeSave perhaps that I could ensure the value is unchanged and notify the user if some of their attempted updates did not go through? This would have to be without throwing an error of any kind though, since it appears Espo does not update the client side view on partial success for a mass update (the successfully updated rows still show their old value until you refresh).

      Comment


      • #4
        You can catch it with beforeSave hook

        Comment


        • #5
          OK, and would getFetched("columnName") get the original value of a particular column that is in the process of being saved? Then I would just overwrite the new value with the old value using set()?

          That takes care of preventing the update, but is there a way to have the process succeed yet still yield a warning/note to the user saying that not all items were updated? Throwing an error yields a message of course, but doesn't work well because the UI does not reflect the partial success of the operation.

          Comment


          • #6
            you can throw the Error with the message
            Maybe I'm missing something here but is there any reason why I cannot throw an error in the beforeSave hook??? thanks in advance! Scott

            Is it possible to only allow certain users to create a new entity based on a field in another entity? For example, I have a one-to-many relationship between Jobs

            Comment


            • #7
              I already had it coded to throw an error but the problem is the Espo UI can't handle partial success. For example, if I Mass Update 10 rows in a list view and they all succeed, it reflects the updated values in the UI immediately. However, if I Mass Update 10 rows and 5 succeed and then one or more fails and throws an error, the values are not updated in the UI for the 5 that succeeded. The user is left in a state where it's unclear what worked unless they do a refresh.

              Is there a way to display a message on Mass Update that does not mess with the UIs ability to reflect values that successfully updated? Or some other way for it to be able to handle partial success on Mass Update? Alternatively, is there a way to get the entire Mass Update to fail if one update fails so the UI at least stays in the right state and I can tell the user they have to retry for whatever reason?

              Comment

              Working...
              X