I’ve made a custom module with a module logic hook on the after_relationship_add and after_relationship_delete that call the same class were I have a function that make the sum of an integer field found in the related records and write it to a field in my module. So when I go in the detailview to add relation in the subpanel with the multi select popup window, the update take place inside the detailview and when I go back to the listview everything is good. The probleme is when I delete relation in the detailview, the modification appered in the detailview but not in the listview. So the information beteewn the listview and the detailview are the same when I add relationship but not when I make a delete.
Is there any kind of cache on the server side that is compile for the listview and dont get updated on a relationship delete or something like that ?
I’m new to suitecrm so there are somethings I dont understand yet!
Do you mean it doesn’t update the List view, even after you refresh the screen?
I don’t know the answer, but this is what I would try if I were you:
See how things happen in the code when you delete a relationship in one of the default modules. Does the same thing occur in the list view? If not, then check the code to see how it refreshes - look for any commands related to cache or session parameters, etc.
I’ve been working through adding a after_relationship_add logic hook and I saw similar behavior when I had a php error in my logic hook code that was causing the php to halt mid-step. Once I cleared up the php coding issues the page would refresh on adding a related record. Try adding some debug statements like