//Create the customization set variable to hold the required changes
var cs = entity->createCustomizationSet();
//Create a new entity
entity->createEntity(cs, "product");
entity->createEntity(cs, "category");
//Create some properties
entity->createProperty(cs, "product", "name", "string", true, "");
entity->createProperty(cs, "product", "description", "string31", false, "");
entity->createProperty(cs, "product", "price", "decimal", false, "0");
//Create a relationship
entity->createRelationship(cs, "product_category", "n:1", "product", "category", null, null, false)
//Publish the customization set
entity->publish(cs);
method alterEntity(cs as customizationset,
entityName as string, isACLEnabled as bool)
Alters an entity by enabling or disabling ACL.
method changeOwnership(entityName as string, key as int,
idUser as int, idBusinessUnit as int, idOrganization as int)
Changes the ownership of a record within an entity.
Since 1.7.0
function createCustomizationSet() as customizationset
Creates a new customization set.
method createEntity(cs as customizationset, entityName as string)
Creates an entity.
method createEntityACL(cs as customizationset,
entityName as string, isACLEnabled as bool)
Creates an entity with ACL enabled.
method createProperty(cs as customizationset, entityName as string,
propertyName as string, type as string, isRequired as bool,
defaultValue as string)
Creates a property.
type can be one of the following:
"#", "int" or "integer" for INTEGER data type."%" or "decimal" for DECIMAL data type."@" or "datetime" for DATETIME data type."&" or "string" for STRING data type."&31" or "string31" for STRING31 data type.method createRelationship(cs as customizationset,
relationshipName as string, relationshipTypeName as string,
entityName as string, foreignEntityName as string,
propertyName as string, foreignPropertyName as string, isRequired as bool)
Creates a relationship.
relationshipTypeName can be one of the following: OneToMany, OneToOne, ManyToMany, ManyToOne, ParentChild, ChildParent
method createRelationshipEx(cs as customizationset,
relationshipName as string, relationshipTypeName as string,
entityName as string, foreignEntityName as string,
propertyName as string, foreignPropertyName as string, isRequired as bool,
sortPropertyName as string, sortAsc as bool)
Creates a relationship with sorting options.
method publish(cs as customizationset)
The customization set is published.
method unpublish(customizationSetName as string)
The customization set is unpublished.
| Property | Type | Description |
|---|---|---|
| name | string | The name of the customization set |