Script unit that provides methods to create and update complex values.
Methods |
---|
foreignKeyOf<foreignKeyType>(): foreignKeyType Create an instance of a foreign key type. |
of<complexType>(): complexType Create an instance of a complex type. |
primaryKeyOf<primaryKeyType>(): primaryKeyType Create an instance of a primary key type. |
foreignKeyOf<foreignKeyType>(): foreignKeyType
Create an instance of a foreign key type.
Note: A foreign key field contains a primary key on the referenced table.
This method is equivalent to the method complex.primaryKeyOf. The method complex.primaryKeyOf should be preferred
Example:
uses core.complex as complex; export function getValue(): typeof _ebx.record.Supervisor begin var foreignKey := complex.foreignKeyOf<typeof _ebx.record.Supervisor>(); foreignKey.Id := 435; return foreignKey; end
Function Types :
primaryKeyType: the primary key type. Can be the type of a foreign key or a an expression foreignKeyOf. Is mandatory.
Return :
the new foreign key object. Is always mutable.
Can be used in: Script tasks, Table triggers, Function fields
of<complexType>(): complexType
Create an instance of a complex type.
Example:
uses core.complex as complex; export function getValue(): typeof _ebx.record.OfficeAddress begin var value := complex.of<typeof _ebx.record.OfficeAddress>(); value.Street := '4323 Broadway'; value.City := 'New York'; value.State := 'NY'; value.Zip := '10019'; value.Country := 'USA'; return value; end
Function Types :
complexType: the object type. Is mandatory. Should be an expression typeof identifier.
Return :
the new object. Is always the mutable version of the specified type.
Can be used in: Script tasks, Table triggers, Function fields
primaryKeyOf<primaryKeyType>(): primaryKeyType
Create an instance of a primary key type.
Note: A foreign key field contains a primary key on the referenced table.
Example:
uses core.complex as complex; export function getValue(): typeof _ebx.record.Supervisor begin var foreignKey := complex.primaryKeyOf<typeof _ebx.record.Supervisor>(); foreignKey.Id := 435; return foreignKey; end
Function Types :
primaryKeyType: the primary key type. Can be the type of a foreign key or an expression primaryKeyOf. Is mandatory.
Return :
the new primary key object. Is always mutable.
Can be used in: Script tasks, Table triggers, Function fields