I need to relate my Account module record to my custom module existing record base on conditions using controller files.
Any advise or guidance would be greatly appreciated..!!
There is an API for that, in your instance, from the browser go to:
Relates an existing record to this module
Create a single record and relate it to this module
depending on whether you want to link an existing record or create a new record and link it
Thanks Francesca Shiekh
In a JS controller you execute something like:
var relatedModel = app.data.createRelatedBean(parentModel, model.id, link)
link-action.js from the OOTB code does this, as well as page.js from the src directory in the
Sidecar Developer Tools: GitHub - sugarcrm/SidecarDevTools: Browser extension for Sugar 7 Sidecar framework development
Thanks Robert Bers
Retrieving data ...