Versions Compared

Key

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

...

  • Supports most Salesforce formulas (see more information about formula fields)

  • Follow the processing steps on the Pulsar Settings Manager tab (NOTE: this is currently a limitation of the Salesforce platform, as we cannot directly sync validation rule metadata, but have to use the processing steps).

  • Set pulsar.validation.enableSFDCValidationRules Pulsar Setting to TRUE to enable this functionality in the Pulsar mobile app

  • NOTE: If a PSL BeforeSave setting exists on an object, it will be run BEFORE saving the object and BEFORE processing any Salesforce ValidationRules for that record.

...

Pulsar originally did not support running Salesforce validation rules, and instead offered similar functionality through logic implemented in Pulsar Settings Language (PSL).  Because PSL leverages the power of raw SQL, you can create complex validation logic that exceeds what Salesforce formula validation rules can perform.  Despite (or frankly because of) the power of PSL validation rules and triggers, we recommend that you use Salesforce validation rules if possible before bringing PSL to bear on a thorny problem.

...

The Validation Rules and Triggers are defined using Pulsar Settings Language (PSL). The general format for such a setting is as follows:

Name:  Object Name – execution point<Object Type> – <execution point>
Key:     pulsar.<executionPoint>.<ObjectAPIName>
Value:  Pulsar Settings Language

One exception to this format is Note, besides this single object format, the OnCreate setting also supports a parent/child format. See OnCreate Trigger section below for more information.

...

The OnCreate trigger executes whenever the related list plus button is tapped which is before other save triggers have a chance to run. There are two separate execution points that override the plus button on the listviews or on a specific child related list (see below for these two formats). When this setting is specified, the standard behavior to show the object in create mode is overridden with custom PSL code. This means that the PSL must ultimately handle how to respond to the plus button tap. For example, if the standard behavior is needed, the 'CreateAndMapFields' PSL action should be called as the last action in the custom PSL. There are two variants of OnCreate that can be used (Standard and PreInit), but only one should be specified per Parent/Child object association. If both happen to be specified, the PreInit variant will be executed and the Standard variant will be ignored. The difference between them is the context available to your PSL code. With the Standard variant, the context

Single object setting (to override plus button action on the object’s listviews)

Setting Format :

Name:  <Object Type> – <execution point>
Key:     pulsar.onCreate.<Object API Name>
Value:  Pulsar Settings Language

The PSL context for the single object format is the newly initialized object itself (in memory only). With the PreInit variant, the context is the parent of the object to create. You might decide to use PreInit if there are some actions or checks that must occur before the new child object can be initialized, perhaps to ensure certain values are passed to the create action.

Standard setting format:

Name:  Object Name – execution pointPlease note that specifying this setting does not imply a default for any of the object’s related lists. To override the standard plus button action there, the parent/child settings must also be explicitly specified.

Parent/Child object setting (to override plus button action for a child related list)

Setting Format:

Name:  <Parent>/<Child> – <execution point>
Key:     pulsar.onCreate.<Parent Object API Name>.<Child Object API Name>
Value:  Pulsar Settings Language

PreInit setting format:

Name:  Object Name – execution point

Key:     pulsar.onCreate.<Parent Object API Name>.<Child Object API Name>.PreInit
Value:  Pulsar Settings LanguageThe PSL context for the parent/child format is the parent of the object to create.

Example Validation Rule

Name:   Order - Before Edit
Key:      pulsar.beforeEdit.Order__c
Value:   See the code below. This setting executes when the user tries to edit a record, and uses a query to determine if the user attempted to update a record that is already in status "Finalized" or "Cleared". If so, it alerts the user with the appropriate message.

...

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

...