Interface IDefaultValue
The system entity for a Default Value, which is used for dynamically ensuring items have a certain value whenever they are created by the system or a user
See https://help.lemonedge.com/help/api/code/default-values/intro.html for more information
Inherited Members
Namespace: LemonEdge.API.Entities.Design
Assembly: LemonEdge.API.dll
Syntax
[EntityDefinition(EntityID.DefaultValue, "dbo.LT_DefaultValues", "DefaultValue", IsStandingDataEntity = true, HelpURL = "help/api/code/default-values/intro.html")]
[DefaultEntityIcon(ImageType.Properties)]
public interface IDefaultValue : IBaseEntityWithPermissions, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties
Properties
DefaultObjectID
Links to IDefaultObject. The parent default object this value is a member of.
Declaration
[EntityProperty(SQLType.UniqueIdentifier, true)]
[EntityRelationship(EntityID.DefaultObject, "ID", SingleJoinType.ZeroToOne, "Default Object", "Default Values", DeleteWithRelationship = true, PartOfParentSet = true, LinkToItemInSet = true, InheritPermissions = true)]
[EntityKeyProperty]
Guid? DefaultObjectID { get; set; }
Property Value
Type | Description |
---|---|
Guid? |
EntityTypeID
[Key] Indicates what entity you want to provide a default value for when new.
Declaration
[EntityProperty(SQLType.UniqueIdentifier, true, IsEntityTypeLink = true)]
[EntityKeyProperty]
[RequiredNoDefaultIDValidation]
Guid? EntityTypeID { get; set; }
Property Value
Type | Description |
---|---|
Guid? |
FormulaValue
A formula value that is evaluated at runtime when the new entity is being created. You can specify a formula that works against a context which includes this new item.
Declaration
[EntityProperty(SQLType.NVarChar, true)]
[EntityDescription("The formula which results in a value to provide as the dedfault value for this property.")]
string FormulaValue { get; set; }
Property Value
Type | Description |
---|---|
string |
HardcodedValue
A constant hardcoded value for this property. Whatever you enter will be parsed and stored against that type. For instance if the property is a boolean, and you enter 1 or true, the system will store true against that property by default. If it fails to parse the value it will throw an error.
Declaration
[EntityProperty(SQLType.NVarChar, 500, true)]
[EntityDescription("The hardcoded value to always provide as a value for any new property.")]
string HardcodedValue { get; set; }
Property Value
Type | Description |
---|---|
string |
ParentEntityTypeValue
The type of the parent default object to use for this property.
Declaration
[EntityProperty(SQLType.Bit, false, "0")]
[EntityDescription("The type of the parent default object to use for this property.")]
bool ParentEntityTypeValue { get; set; }
Property Value
Type | Description |
---|---|
bool |
ParentPropertyValue
The name of the property on the parent default object to use for this property.
Declaration
[EntityProperty(SQLType.NVarChar, 500, true)]
[EntityDescription("The name of the property on the parent default object to use for this property.")]
string ParentPropertyValue { get; set; }
Property Value
Type | Description |
---|---|
string |
Property
[Key] The name of the property you want to override the default behaviour of and provide a default value for.
The system provides a drop down list of all properties against the Entity Type of this Default Value.
Declaration
[EntityProperty(SQLType.NVarChar, 500, false)]
[EntityDescription("The entity property to provide a default value to.")]
[Required]
[EntityKeyProperty]
string Property { get; set; }
Property Value
Type | Description |
---|---|
string |