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?
-
Epicor-SugarCRM Integration by TCP
FEATUREDGive your SugarCRM users seamless access in real time to any data in your Epicor ERP. Arm your Sales and Customer Service teams with the information they need to provide a high-definition customer exp...
-
Dropbox Integration for Sugar
FEATUREDSharing files across multiple platforms can be time consuming and confusing. What if you could utilize the sharing power of Dropbox all from within your SugarCRM platform? Dropbox integration combines...
-
Asterisk Integration With SugarCRM
Asterisk Integration allows click-to-call functionality, inbound/outbound call logs, call notification pop-ups and more to work seamlessly with any SugarCRM module, so your sales and support teams can...
- Show more addons