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?
-
CRM Social Collaboration Ninja
Have conversations about any record in Suite CRM & SugarCRM just like on Facebook or any social network.
-
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.
-
Sugar Connector for Jira
FEATUREDGet a 360 degree view for your Support and Dev-Ops Teams. Give the users the ability to work and track Jira issues within Sugar.
- Show more addons