Versions Compared

Key

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

...

One exception to this format is the OnCreate setting. See OnCreate Trigger section below for more information.

Info
titleA note about Save Triggers

To avoid issues with saving your data, we recommend not using SyncNow with Save triggers.


OnCreate Triggers

The OnCreate trigger executes whenever the related list plus button is tapped which is before other save triggers have a chance to run. 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 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 point
Key:     pulsar.onCreate.<Parent Object API Name>.<Child Object API Name>
Value:  Pulsar Settings Language

PreInit setting format:

Name:  Object Name – execution point

...