|
Parameter
|
Description
|
|---|---|
|
type
|
Related relationship type. Currently, referential, master, and hierarchical are supported.
|
|
targets
|
Full identifiers for the collection of target objects for the related relationship.
|
|
Parameter
|
Description
|
|---|---|
|
name
|
Related relationship name. If not specified, the source object and field identifiers are combined to set this value.
|
|
identifier
|
Related relationship identifier. If not specified, the source object and field identifiers are combined to set this value.
|
public static IMaxObject createRelationshipField(String relatedObjectFullIdentifier, String name, String identifier, String namespaceIdentifier, String applicationName, Relationship relationship, Map<String,Object> additionalFields = [:])
import com.servicemax.core.utils.Definitions
import com.servicemax.core.definitions.Relationship
def relationship = Relationship.fromMap([io_type: 'referential', targets: ['io_user', 'io_account']])
Definitions.createRelationshipField('io_showcase', 'Test Relationship Field', 'test_relationship_field', 'io', 'Max', relationship)