Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The formula field order and default value field order settings both allow you to specify a list of field API names separated by commas, newlines, or semicolons. The setting key optionally allows you to narrow the scope to a specific record type.  

Formula Field Order Setting Format

Name: Object Name – Formula Field Order
Key: pulsar.<object API name>[.<record type developer name>].formulaFieldOrder
Value: Field1APIName, Field2APIName, Field3APIName, ...

Example:

Name: Order Line Item – Formula Order
Key: pulsar.Order_Line_Item__c. formulaFieldOrder
Value: Unit_Price__c,Total_Discount__c,Amount__c

Default Value FIeld Order Setting Format

Name: Object Name – Default Value Field Order
Key: pulsar.<object API name>[.<record type developer name>].defaultValueFieldOrder
Value: Field1APIName,
           Field2APIName,
           Field3APIName,
           ...

Example:

Name: Cheque - Default Value Order
Key:  pulsar.Cheque__c.CashierCheque.defaultValueFieldOrder
Value: Cheque_Date__c,
         

...

 

...

Cheque_Number__c 

Formula Settings

Defining the formulas associated with the default value or formula fields requires using PSL. The only requirement is to use the SetFieldInMemory action to set the resulting value to the field in question. The setting key optionally allows you to narrow the scope to a specific record type, as with the field order settings above.

Formula Field Formula Setting Format

Name: Object Name – Formula Field – Field Name
Key: pulsar.<object API name>[.<record type developer name>].<field API Name>.formula
Value: Pulsar Settings Language

Example:

Name: Order Line Item – Formula Fields – Unit Price
Key: pulsar.Order_Line_Item__c.Unit_Price__c.formula
Value:  See the code below. Notice that the last action is the SetFIeldInMemory action.

Code Block
DEFAULT{
Action=SetVar;
VarName=UnitPrice;
VarValue=Product__r.Unit_Price__c;
|
Action=SetFieldInMemory;
FieldType=General;
FieldName=Unit_Price__c;
FieldValue=%%UnitPrice%%;
}

 

Default Value Formula Setting Format

Name: Order Line Item – Formula Field – Total Discount Object Name – Default Value Field – Field Name
Key: pulsar.Order_Line_Item__c.Total_Discount__c.formula
Value:

Code Block
DEFAULT{
Action=SetVar;
VarName=PromotionDiscount;
VarValue=Product__r.Discount__c;
|
Action=SetVar;
VarName=Discount;
VarValue=Discount__c;
|
Action=SqlQuery;
QueryString=SELECT (CAST(‘%%PromotionDiscount%%’ AS REAL) + CAST(‘%%Discount%%’ AS REAL)) AS TotalDiscount;
QueryReturnFields=TotalDiscount;
|
Action=SetFieldInMemory;
FieldType=General;
FieldName=Total_Discount__c;
FieldValue=%%TotalDiscount%%;
}

 

Name: Order Line Item – Formula Field – Amount
Key: pulsar.Order_Line_Item__c.Amount__c.formula
Value:

...

 pulsar.<object API name>[.<record type developer name>].<field API Name>.defaultvalue
Value: Pulsar Settings Language

Example:

Name: Cheque – Default Value Field – Cheque_Date__c

Key:  pulsar.Cheque__c.CashierCheque.Cheque_Date__c.defaultValue
Value: See code below. Notice that the last action is the SetFIeldInMemory action. 


Code Block
DEFAULT{ 
Action=SetVar; 
VarName=ThisDay; 
VarValue=@@Today; 
| 
Action=SetFieldInMemory; 
FieldType=General; 
FieldName=Cheque_Date__c; 
FieldValue=%%ThisDay%%; 
}