Adding automation to an preexisting module

New to SuiteCRM and starting to get to grips with the framework in some respects, but in others still struggling! I’ve read the whole online developer guide, a lot of the Sugar Developer Guide. Lots of questions, but one in particular that I think may help me understand the framework better.

Where do I put automation logic for preexisting modules?

I have a custom field for invoices, which I’d like to populate automatically on creating a new invoice. The logic should be simple - it’s just the 2 digit year then a number in a series starting from 1 for the first invoice of the year. However, does it go in the View, in the Controller, should I attach it to a logic hook somehow…?

Any guidance on how to get started would be welcome!

Thanks

Hi @Sherratt ,

Welcome to the community!!

There are two main ways to add customization to any module. Workflows and Logic Hooks.

In this case I’ll recommend you to use the second option.

I’ll leave you the links to the documentation:

Hi @BrozTechnologies, and thanks for the welcome.

I’ll definitely have another look at Logic Hooks, although when I was looking at it previously, there didn’t seem to be anything that would allow me to hook into a new invoice being created. I haven’t used them for anything else either yet, so maybe it will become apparently if I play with it a bit.

Thanks again

Apologies @BrozTechnologies. Even after 2 minutes of looking, it is apparent that there are couple of ways I can use the Logic Hooks.

1 Like