I have a JS boolean function that I've created to check if a Quote in SugarCRM 7.9 has any quote line items.
The problem that I have is that I seem to be forced down the route of defining the function in record.js and create.js.
I've tended to create functions in fields rather than views in order to avoid this happening;. However,as this relates to the view itself (i.e. whether a relationship to any lines exist), I think it doesn't work in the context of any field.
Therefore, this leaves me needing to replicate the code in both create and record.
Is there a better way for me to do this? Another file I can insert it into which both record and create inherit?