NewSiblingRecord

Learn about the NewSiblingRecord action template.

The NewSiblingRecord action template is used to create a new child record linked to the same parent as the current record without having to navigate to the parent record first. Example - create a new MA record while viewing an existing MA record (Expand and List view).

The NewSiblingRecord action automatically passes the required parent link information from the existing record to the new sibling record, e.g. creating a new MA starting from an MA record that is linked to a KP automatically transfers the company and person keys to the new record. To pass additional links or any other field values to the new record, define "copy fields" in the action specified in actionName. See example below.

In UPDATE_DEFAULT the NewSiblingRecord action is used by the A_NewSiblingRecord and A_NewSiblingTicketRecord menu actions. Two buttons use these menu actions: NewSiblingRecord and NewSiblingTicketRecord.

Example - To implement this for MA (and without passing on any additional links), you only need to add the NewSiblingRecord button to the MA Expand header.

The NewSiblingRecord action template supports the following input arguments:

uid

The record for which a sibling record is created. It is the current record.

actionName

The action that actually creates the new sibling record, e.g. A_NewSiblingRecordExecute which calls an ExpandNew action. For further details, see Expand.

fieldGroupName

An optional field group to be used instead of the info area's default field group <infoAreaId>.

linkNames

A comma-separated list of info area IDs specifying which additional link(s) should be used for the new record.

Example: linkNames = KM,KP|PE|FI uses the link to KM and the first link to KP or PE or FI.

Note: The specified links must be present in the Parent Data section of the source record's Expand view. For further details, see Expand Configuration (View Parent Relations).
Note: Make sure the action specified in actionName can handle the result of linkNames. Otherwise use "copy fields" (copyUid/copySourceFields/copyTargetFields) instead to pass the desired link information to the new record (see example below).

Example: New Ticket with multiple FI/KP links

Creating a sibling ticket using the out-of-the-box A_NewSiblingTicketRecord menu actions uses the source ticket's default link, which is the ticket's direct parent for the other company/person links as well (End Customer, Contact and Billing).

To use the additional links from the source ticket in the new sibling record, define copy fields in the action entered as actionName, e. g. A_NewSiblingTicketRecordExecute:

Make sure you add all required key fields (example - 81-84 for the End Customer Company and Person links) as well as the reference fields (example - 85 and 86). Adding the latter ensures that the user sees which company/person is used while creating the record. Without those fields the correct links are displayed only after saving the new record.

If you want the new record to be automatically saved, set the autoSave parameter to true. For further details, see autoSave.