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://web.lemonedge.com/help/default-values/ for more information
Inherited Members
Namespace: LemonEdge.API.Entities
Assembly: API.dll
Syntax
[EntityDefinition(EntityID.DefaultValue, "dbo.LT_DefaultValues", "DefaultValue", IsStandingDataEntity = true, HelpURL = "default-values")]
[DefaultEntityIcon(ImageType.Properties)]
public interface IDefaultValue : IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties
Properties
EntityTypeID
[Key] Indicates what entity you want to provide a default value for when new.
Declaration
[EntityProperty(SQLType.UniqueIdentifier, false, IsEntityTypeLink = true)]
Guid EntityTypeID { get; set; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.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, (short)500, true)]
[EntityDescription("The hardcoded value to always provide as a value for any new property.")]
string HardcodedValue { get; set; }
Property Value
Type | Description |
---|---|
System.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, (short)500, false)]
[EntityDescription("The entity property to provide a default value to.")]
[Required]
string Property { get; set; }
Property Value
Type | Description |
---|---|
System.String |