The "utils" option allows you to define custom global utility functions. One use of a custom utility function is for populating a dropdown from the database. For example, you may wish to have a custom field on a contract that tracks what product is associated to it. There are two main steps to do this; define the custom function and then tell the custom field to pull from the function.
Using the module manifest organization mentioned in a previous post (https://www.sugaroutfitters.com/blog/organizing-files-in-a-module-zip) we first create the utils function in contract_products.php:
/extensions/application/utils/contract_products_utils.php
Now we tell our custom field to pull from this new function:
/extensions/modules/Contracts/vardefs/product_dropdown_vardefs.php
Finally, we add these to the manifest so that it will get installed via the Module Installer:
What other purposes have you used custom utils for?
-
Advanced Trackers
FEATUREDLet the platform keep your organization on track! Need to monitor or track how often a specific field changes? Advanced Trackers by Faye helps you measure your organization's performance or veloc...
-
SM Dynamic Target List
Create a dynamic list based on your collected data and always be up to date with your audience in SugarCRM! The Solutions Metrix Dynamic Target List add-on empowers you to easily build dynamic lists b...
-
NBL Genesys
FEATUREDSave time and increase agent productivity with click-to-dial, letting the platform log inbound and outbound calls. NBL Genesys integrates the Genesys Cloud (aka PureCloud) with SugarCRM, making call d...
- Show more addons