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?
-
Fuzzy Search - Axia Add-On
Trying to enter a search term but the right word is escaping you? Almost like it's a bit fuzzy in your mind? With Fuzzy Search by Faye, you can improve Sugar's native search engine by incorp...
-
Survey Rocket for SugarCRM
FEATUREDSugarCRM Survey Plugin With Survey Rocket, a SugarCRM survey plugin, you can build surveys that trigger automatically to get real-time feedback from customers. It gives custom survey templates, on...
-
SugarDocuSign
SugarDocuSign for SugarCRM allows you to send e-sign contracts for electronic signature with DocuSign services and track your documents anytime, anywhere within minutes.
- Show more addons