AgileApps Support Wiki Pre Release

Difference between revisions of "Field Scripting Variables"

From AgileApps Support Wiki
imported>Evelyn
m
 
imported>Aeric
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Variables are standardized using the following syntax:
Depending on where they are used, variables may need to be specified with braces (<tt>${variable}</tt>) or without them (<tt>$variable</tt>). (See [[Template Variable Contexts]] for a list of places in which variables are available.)
 
Except for that difference, variables are standardized using the following syntax:


:<tt>$objectname.fieldname</tt>
:<tt>$objectname.fieldname</tt>


::Where <tt>objectname</tt> is the name of the tab or object (Prospect, Account, Contact, etc.) and the <tt>fieldname</tt> is the name of the field (owner, description, etc.)
::Where <tt>objectname</tt> is the name of the tab or object (Cases, Accounts, Contacts, etc.) and the <tt>fieldname</tt> is the name of the field (owner, description, etc.)


;Second-degree Related Objects:
;Second-degree Related Objects:
Line 13: Line 15:
:<tt>$objectname.fieldname.seconddegree</tt>
:<tt>$objectname.fieldname.seconddegree</tt>


::Where <tt>objectname</tt> is the name of the tab or object (Prospect, Account, Contact, etc.), <tt>fieldname</tt> is the name of the field (owner, description, etc.) and <tt>seconddegree</tt> is the name of the second-degree related object
::Where <tt>objectname</tt> is the name of the tab or object (Cases, Accounts, Contacts, etc.), <tt>fieldname</tt> is the name of the field (owner, description, etc.) and <tt>seconddegree</tt> is the name of the second-degree related object


;Examples:  
;Examples:  
:*To include the email address of a primary contact in a prospect, use this syntax:
::<tt>$prospect.primary_contact_id.email</tt>
:*To get the <tt>tax_type</tt> of an <tt>autopolicy</tt> <tt>insurer</tt>, use this syntax:
:*To get the <tt>tax_type</tt> of an <tt>autopolicy</tt> <tt>insurer</tt>, use this syntax:



Latest revision as of 18:25, 25 July 2013

Depending on where they are used, variables may need to be specified with braces (${variable}) or without them ($variable). (See Template Variable Contexts for a list of places in which variables are available.)

Except for that difference, variables are standardized using the following syntax:

$objectname.fieldname
Where objectname is the name of the tab or object (Cases, Accounts, Contacts, etc.) and the fieldname is the name of the field (owner, description, etc.)
Second-degree Related Objects

Second-degree related objects can also be used in templates, and provide the ability to to drill down to one level of the hierarchical lookup from the object.

Second-degree related object variables are standardized using the following syntax:

$objectname.fieldname.seconddegree
Where objectname is the name of the tab or object (Cases, Accounts, Contacts, etc.), fieldname is the name of the field (owner, description, etc.) and seconddegree is the name of the second-degree related object
Examples
  • To get the tax_type of an autopolicy insurer, use this syntax:
$autopolicy.insurer.tax_type
Where 'autopolicy' and 'insurer' are objects, and 'tax_type' is a field in the 'insurer' object