Copying Data Using a Trigger

If you want to copy data (i. e. handing data over to another info area), add a row of type TriggerExecution to the desired Legacy Form and enter CopyRecords in the Func column.

This results in a filter being used instead of a workflow. This filter defines which data of the records and their children is copied.

Copying Records from the Same Info Area

If the source and target record are from the same info area, the filter needs to define either predefined values to be applied or the child info area(s) where to you want to copy data.

Example:

Func parameter for TriggerExecution: $CopyDate ;$ Record;CopyRecord;PR.CopyFilter

PR.CopyFilter:



This filter defines that a new offer (PR) record is automatically added containing the following values:

  • All fields that are specifically stated in the filter with the corresponding values
  • All fields of the referenced List control (set with Parameter :SourceConfig =[Search&List name], >> see the example in Copying Records from a Different Info Area).
  • The links of all linked fields of the references List control.

A new AP (Offer Item) record is added for each offer item of the source (PR) record and the same rules are applied (i. e. the link to the new PR record is automatically set).

Note: If (like in the example above) no Search&List configuration was given (and therefore, no List control is referenced), the List controls with the same name than the info area (PR and AP in the example) are used. If you want to reference a different Search&List configuration (and its List control), use Parameter :SourceConfig =<Search&List name<, >> see the example in Copying Records from a Different Info Area).

Copying Records from a Different Info Area

If the source record belongs to a different info area, ensure that the fields you want to copy are set in the filter.

Example:

Copying an opportunity (Y1) to an offer (PR):

Func parameter for TriggerExecution: $CopyDate ;$ Record;CopyRecord;PR.CopyFromY1



This filter defines that a new offer (PR) record is automatically added containing the following values:

  • All fields that are specifically stated in the filter with the corresponding values
  • The links of all linked fields of the referenced List control (set with Parameter:SourceConfig=<Search&List name>

A new AP record is created for each Y5 record of the copied Y1 record (not filtered by the Y5 source Search&List configuration) with the following values:

  • All fields that are specifically stated in the filter with the corresponding values
  • All links of link fields in the referenced List control
  • The link to the parent records (in this example PR) is set automatically
Note: If you copy records from several several you must define a Search&List configuration using Parameter :SourceConfig.