We’re customizing SuiteCRM to fit with our business. Can anyone help with below technical problem pls ?
[b]We have 2 enties: [Parent] & [Child].
On the CREATE screen, we also have 2 releated field [Parent] & [Child], now when user select one record on Parent we want the records on Child need to repopulate by Parent record. Please help me to do this. [/b]
My approach is developing a Custom Field Type for [Parent] which I can catch the event on it (onChange/onClick,…) then using ajax to call back-end to load data for [Child].
Once you are using PHP I would recommend using the bean instance and not querying the database. I think it is more coherent and transparent when coding.
If your change is used on edit view, on the before_save hook, use BeanFactory to get the related bean you ned. then attribute it’s value to your new field. From this perspective maybe you do not need to expend time creating a new field type
joaorpgomes, note that the person who posted that last bit of code was razgrizgt, who was just trying to help with a code sample, it wasn’t haimm (who made the original post). So yeah, this sometimes gets confusing