...
Code Block |
---|
DEFAULT{ Action=SetVar; VarName=Order_Id; VarValue=Order__c; | Action=SqlQuery; QueryString=Select SUM ( CAST( Amount__c AS REAL ) ) AS SUM_ORDER_AMOUNT FROM Order_Line_Item__c WHERE Order__c = ‘%%Order_Id%%’; QueryReturnFields=SUM_ORDER_AMOUNT; | Action=SqlQuery; QueryString=Update Order__c SET Sub_Total__c = ‘%%SUM_ORDER_AMOUNT%%’ WHERE Id = ‘%%Order_Id%%’; } |
Field Triggers
Currently we only support the 'After Update' trigger type for reference fields. The trigger code can be any valid PSL and is executed only after a specified reference field has been updated.
After Update Field Trigger Setting (without record type)
Name: Field AfterUpdate Trigger (<object name> : <field name>)
Key: pulsar.<Object API Name>.<Field API Name>.afterUpdate
Value: Pulsar Settings Language
After Update Field Trigger Setting (with record type)
Name: Field AfterUpdate Trigger (<object name> : <record type> : <field name>)
Key: pulsar.<Object API Name>.<Record Type Developer Name>.<Field API Name>.afterUpdate
Value: Pulsar Settings Language
Example After Update Field Trigger
Name: Field AfterUpdate Trigger (Opportunity : AccountId)
Key: pulsar.Opportunity.AccountId.afterUpdate
Value: See the code below. The following example runs the code to update the NextStep field to 'Create Quote' every time the Account lookup field on the Opportunity object is updated.
Code Block |
---|
DEFAULT{
Action=SetFieldInMemory;
FieldType=General;
FieldName=NextStep;
FieldValue=Create Quote;
} |