Rule/Guideline
|
Example
|
---|---|
Function references must have the prefix $F.
|
$F.TODAY(), $F.USERNAME()
|
Field Label references must have the prefix $M. and suffix .label.
Note: To display the label of any field(s) of an object, the value of at least one field from the corresponding object must be included in the template.
|
$M.Service_Quote.SVMXC__Discount__c.label, $M.Service_Quote.Name.label
|
Field Value references must have the prefix $D.
|
$D.Service_Quote.SVMXC__Discount__c, $D.Service_Quote.SVMXC__Company__c.Name
|
The expressions for accessing any function, label, or value must be enclosed in double braces
|
{{$F.TODAY()}}, {{$M.Service_Quote.Name.label}}, {{$D.Service_Quote.SVMXC__Discount__c}}
Note: Do not use double braces anywhere else in the template, other than for expressions because any content in double braces is going to be considered as an expression. Use a space between two braces if you must use two braces in the template for reasons other than expressions.
|
In a nested expression, double braces must be used only at the outermost level.
|
{{$F.INT($D.Service_Quote.SVMXC__Total_Line_Price2__c)}}
{{$F.LNUMBER($F.ROUND($D.Service_Quote.SVMXC__Total_Line_Price2__c,2))}}
|
Arithmetic operations can be directly achieved without using any special functions, by combining field value references with arithmetic operators.
|
{{$D.Service_Quote.SVMXC__Total_Line_Price2__c – ($D.Service_Quote.SVMXC__Total_Line_Price2__c * $D.Service_Quote.SVMXC__Discount__c/100)}}
|
Do not use Javascript code in field values.
|