AutoCreateNewObjectAction

The AutoCreateNewObjectAction action creates an instance of a business object.

Parameters

This action accepts the following parameters:
objectType
Required: The object type that identifies the object definition that is used to create the business object.
parentObject
The name of the parent business object. This name must match the objectKey parameter of a previous action that created or found the parent business object. You must specify this parameter when the objectType parameter matches an instance of a child object definition, which is defined in the object definition file. Do not specify this parameter when you are creating primary objects.
referencedObject
The name of the business object to add as a child of the new business object. This name must match the objectKey parameter of a previous action that created or located the object that is referenced by the new business object. You must specify this parameter when the objectType parameter matches an instance of a reference object definition, which is defined in the object definition file. Do not specify this parameter when you are creating primary objects or simple child objects.
templateObject
The name of the business object that is copied when you are creating the new business object. This name must match the objectKey parameter of a previous action that created or located the template object.
objectKey
Optional: The name that is used to keep a reference to the new business object so it can be used by other actions.
abortOnError
Specifies whether to continue the automated testing when the AutoCreateNewObjectAction action cannot be performed. By default, this parameter is set to true to stop automated testing when this action cannot be performed.

Example

The following code snippet shows an example of these parameters when used in the AutoCreateNewObjectAction action:

<!-- Create a new attachment -->
<action name="cmc/automation/AutoCreateNewObjectAction">
  <param name="objectType" value="Attachment"/>
  <param name="objectKey" value="attachment"/>
</action>