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?
-
Magic Integration for Oracle ERP Cloud
FEATUREDEffortlessly Integrate SugarCRM and Oracle ERP Cloud with Magic xpi - Streamline Your Business with Seamless CRM and ERP Integration -
QuickBooks Integration - SYNC by Commercient
FEATUREDYour ERP Accounting data is integrated with your SugarCRM when you use Commercient’s SYNC app. SYNC Accounts, Contacts, Invoices, Sales Orders, Products, Pricing, Inventory, and more! -
Aircall - Sugar Integration
FEATUREDThe Aircall Integration for Sugar Sell is a quick and efficient way to connect your cloud-based phone system with your CRM instance. Now, sales teams can work in their platform of choice and ensure da... - Show more addons