Changes

Jump to: navigation, search

The Musings of Chin - Template Formulas

588 bytes added, 19:43, 15 January 2015
no edit summary
Chin's inaugural Musings entry provides a helpful rundown of [[Template Formulas]] and how they allow you to update field values on any object.
 
[[Category:Chin’s Musings]][[Category:Universal Tracking Application]][[Category:Expert Tips and Tricks]]
 
=Let's learn about Template Formulas:=
==What?==
Template Formulas provide a method for updating [[Standard_Field|standard ]] or [[Custom_Field|custom field ]] values on an object behind the scenes upon saving. They let you perform extra calculations after saving an object. They can be handy because they let you:
# update an object and perform calculations after it has been saved (i.e. support ticket subjects, say you want to combine an [[Autonumber|autonumber field ]] with the L1 subject but, when you first create the L1, the autonumber hasn't been reserved and stored yet until after you save).
# affect objects at different levels (i.e. a L2 formula can be used to update a L1, an L1 formula can be used to aggregate its contacts).
# easily perform difficult calculations with MySQL functionality and avoid heavy scripting (i.e. perform business day calculations).
==Where?==
The configuration settings can be found on most entities now, such as [[UTA |UTA]] L1, L2, L3, transactions, contact roles, or company categories.
==How?==
==When?==
Template Formulas run after an object is saved and uses the newly saved field values for their calculations. They are also [[The Musings of Chin - SmartSimple's Order of Operations|chained ]] such that when saving a L3 the formulas run in the order of L3 global formula, L3 type formula, L2 global formula, L2 type formula, L1 global formula, L1 type formula. When deleting a L3, the formulas for the L2 and L1 are also run.
==Signs when they may be needed==
* When you have to save an object twice to get it to correctly calculate something.
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Disclaimer: Template Formulas are run by the server, so for performance considerations should not be abused. A Template Formula should only be used when a calculation can not be achieved on the page with calculated value custom fields, or when trying to update a field that does not exist on the page (i.e. at L2 you wish to update a L1 field).</pre> ==See Also==* [[Template_/_Type_Formula|Template Formulas]]
526
edits

Navigation menu