I know that I can define a new field and make it Auditable with the “Audit” checkbox option, but I can’t find a way to have a register about when a new item is added to a subpanel.
1.- I have a custom module with a new relation One To Many with the Notes module
2.- I also have a Note created on 01/01/2020
3.- The new subpanel is enable in my custom module each time I’m in detail view design and I add the “This is my first note” to be part of the Project. This happend on 03/03/2020
4.- My workmates can see exactly when the Note was added and start doing some tasks
I would like that the subpanel of my custom module shows a line with the information
Title of the note AND date added to the supanel
In other words–> “This is my first note” AND 03/03/2020
Any easy way to do this? I’m trying with the columns properties (date_entered and date_modified) but both of us has 01/01/2020 and I want the date when the note was linked to my custom module subpanel.
It could be great solutions with no need of PHP editing
Thank you very much!
So after_relationship_add will be triggered when I add something in a subpanel, OK.
Then, I will need to follow these steps:
Using Studio, create a new field in Notes module named “dateLinkedToCustomModule”
Create a hook new after_relationship_add and stamp the current date as a the new value for “dateLinkedToCustomModule” field
Show that field in the subpanel using studio
I have read that the action is triggered on both modules of the relationship. so I ask… Will SuiteCRM try to find a “dateLinkedToCustomModule” field in the CustomModule?? It has no sense for me… the date is a value that only the notes should have (the “MANY” side of the relationship) but not the CustomModule (the “ONE” side of the relationship.
So I’m not sure how to avoid errors or if I’m missing something as a rookie of SuiteCRM, hehehe