Search Results for

    Show / Hide Table of Contents

    Class CustomObjectProperty

    Inheritance
    object
    BaseEntity
    CustomObjectProperty
    Implements
    ICustomObjectProperty
    IShareAcrossAccounts
    IBaseEntity
    IEquatable<IBaseEntity>
    INotifyPropertyChanged
    INotifyPropertyChanging
    ICloneableAsync
    ICanTrackProperties
    ICloneableAsync<ICustomObjectProperty>
    Inherited Members
    BaseEntity.HISTORY_ENDROWUPDATE_COLNAME
    BaseEntity.HasTrackedPropertyChanged(string)
    BaseEntity.OriginalTrackedPropertyValue(string)
    BaseEntity.OriginalTrackedPropertyValue<T>(string)
    BaseEntity.ClearTrackedOriginalValues()
    BaseEntity.GetAllOriginalTrackedPropertyValues()
    BaseEntity.GetLabel(string)
    BaseEntity.SetLabel(string, string)
    BaseEntity.SetSilentLabel(string, string)
    BaseEntity.ResetChangedTrackedPropertiesToOriginalValues()
    BaseEntity.AddTrackedOriginalValue(string, object)
    BaseEntity.SnapshotProperties()
    BaseEntity.RestoreFromSnapshot(Dictionary<string, object>)
    BaseEntity.IsBasePropertyName(string)
    BaseEntity.IsBaseRelationshipID(string)
    BaseEntity.OnPropertyChanging(string)
    BaseEntity.OnPropertyChanged(string)
    BaseEntity.Equals(IBaseEntity)
    BaseEntity.GetHashCode()
    BaseEntity.Equals(object)
    BaseEntity.Clone(object)
    BaseEntity.CopyFromSource(object)
    BaseEntity.TrackChanges
    BaseEntity.ModifiedByUserID_Label
    BaseEntity.ModifiedByUserID_Label_Silent
    BaseEntity.CanvasID_Label
    BaseEntity.CanvasID_Label_Silent
    BaseEntity.AlgorithmStepID_Label
    BaseEntity.AlgorithmStepID_Label_Silent
    BaseEntity.SafeID_Label
    BaseEntity.SafeID_Label_Silent
    BaseEntity.AccountID
    BaseEntity.ID
    BaseEntity.LastUpdated
    BaseEntity.ModifiedByUserID
    BaseEntity.CanvasID
    BaseEntity.AlgorithmStepID
    BaseEntity.SafeID
    BaseEntity.PropertyChanged
    BaseEntity.PropertyChanging
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: LemonEdge.API.Entities.Design
    Assembly: LemonEdge.API.Entities.Auto.dll
    Syntax
    [DataContract]
    public class CustomObjectProperty : BaseEntity, ICustomObjectProperty, IShareAcrossAccounts, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties, ICloneableAsync<ICustomObjectProperty>

    Constructors

    CustomObjectProperty()

    Declaration
    public CustomObjectProperty()

    Properties

    AutoIncStart

    A number that indicates this property is a Int64 (BigInt) column that auto-increments in value starting from this number

    Declaration
    public int? AutoIncStart { get; set; }
    Property Value
    Type Description
    int?

    ColumnMaxLength

    If this column type requires a length, such as nvarchar, then you should specify one here. If none is specified the system assumes nvarchar(max).

    Declaration
    public short? ColumnMaxLength { get; set; }
    Property Value
    Type Description
    short?

    ColumnName

    [Key] A required field which is the unique (within this entity) name of this property. This is the actual name of the column which will be created in the database.

    Declaration
    [Unique(AllowNullOrEmpty = false, MergeWithAnyOtherUniqueProperties = true)]
    [Required(AllowEmptyStrings = false)]
    [PropertyValidation("true", "!string.Equals(MyItem.ColumnName, \"AccountID\", StringComparison.CurrentCultureIgnoreCase)", "The AccountID name is a reserved word already used by the system, please use another.")]
    [PropertyValidation("true", "!string.Equals(MyItem.ColumnName, \"CanvasID\", StringComparison.CurrentCultureIgnoreCase)", "The CanvasID name is a reserved word already used by the system, please use another.")]
    [PropertyValidation("true", "!string.Equals(MyItem.ColumnName, \"ID\", StringComparison.CurrentCultureIgnoreCase)", "The ID name is a reserved word already used by the system, please use another.")]
    [PropertyValidation("true", "!string.Equals(MyItem.ColumnName, \"LastUpdated\", StringComparison.CurrentCultureIgnoreCase)", "The LastUpdated name is a reserved word already used by the system, please use another.")]
    [PropertyValidation("true", "!string.Equals(MyItem.ColumnName, \"ModifiedByUserID\", StringComparison.CurrentCultureIgnoreCase)", "The ModifiedByUserID name is a reserved word already used by the system, please use another.")]
    [FileSafeNameValidation]
    [StringLength(500)]
    public string ColumnName { get; set; }
    Property Value
    Type Description
    string

    ColumnPrecision

    If this field requires a precision and scale (such as decimal) then you can specify the precision component here

    Declaration
    public short? ColumnPrecision { get; set; }
    Property Value
    Type Description
    short?

    ColumnScale

    If this field requires a precision and scale (such as decimal) then you can specify the scale component here

    Declaration
    public short? ColumnScale { get; set; }
    Property Value
    Type Description
    short?

    ColumnType

    The sql type to store the data of this field in.

    Declaration
    [PropertyValidation("true", "MyItem.ColumnType != LemonEdge.Utils.Database.SQLType.TimeStamp", "Tables can only have one timestamp column and that is already used by the LastUpdated column.")]
    [PropertyValidation("true", "MyItem.ColumnType != LemonEdge.Utils.Database.SQLType.Date && MyItem.ColumnType != LemonEdge.Utils.Database.SQLType.DateTime && MyItem.ColumnType != LemonEdge.Utils.Database.SQLType.DateTime2 && MyItem.ColumnType != LemonEdge.Utils.Database.SQLType.SmallDateTime", "The web service only support DateTimeOffset type. You should use this for dates, and date time values instead.")]
    [PropertyValidation("MyItem.ColumnType == LemonEdge.Utils.Database.SQLType.Decimal", "MyItem.ColumnPrecision.HasValue", "A decimal type must have a ColumnPrecision value.")]
    [PropertyValidation("MyItem.ColumnType == LemonEdge.Utils.Database.SQLType.Decimal", "MyItem.ColumnScale.HasValue", "A decimal type must have a ColumnScale value.")]
    [PropertyValidation("true", "LemonEdge.API.Entities.Design.CustomObjectPropertyValidateLinks.IsPropertyTypeValid(MyItem)", "The PropertyType and ColumnType are not compatible.")]
    [EnumDataType(typeof(SQLType))]
    public SQLType ColumnType { get; set; }
    Property Value
    Type Description
    SQLType

    ColumnType_Tooltip

    Declaration
    [NotMapped]
    public string ColumnType_Tooltip { get; set; }
    Property Value
    Type Description
    string

    CustomObjectID

    [Key] Links to ICustomObject. The parent custom object this entity belongs to

    Declaration
    [RequiredNoDefaultIDValidation]
    [Unique(AllowNullOrEmpty = false, MergeWithAnyOtherUniqueProperties = true)]
    public Guid CustomObjectID { get; set; }
    Property Value
    Type Description
    Guid

    CustomObjectID_Label

    Declaration
    public string CustomObjectID_Label { get; set; }
    Property Value
    Type Description
    string

    CustomObjectID_Label_Silent

    Declaration
    [NotMapped]
    public string CustomObjectID_Label_Silent { get; set; }
    Property Value
    Type Description
    string

    DefaultSQLForNotNullable

    If you are adding a column, or altering one, that is not nullable this is the default sql to apply to populate it with a value.

    Declaration
    [PropertyValidation("!string.IsNullOrEmpty(MyItem.DefaultSQLForNotNullable)", "!MyItem.DefaultSQLForNotNullable.ContainsWholeWord(\"go\", StringComparison.InvariantCultureIgnoreCase) && !MyItem.DefaultSQLForNotNullable.ContainsWholeWord(\"drop\", StringComparison.InvariantCultureIgnoreCase, new string[] { \"drop table #\" }) && !MyItem.DefaultSQLForNotNullable.ContainsWholeWord(\"create\", StringComparison.InvariantCultureIgnoreCase, new string[] { \"create table #\" }) && !MyItem.DefaultSQLForNotNullable.ContainsWholeWord(\"exec\", StringComparison.InvariantCultureIgnoreCase)", "Contains invalid sql.")]
    [PropertyValidation("!MyItem.IsNullable", "await LemonEdge.API.Entities.Design.CustomObjectPropertyValidateLinks.IsNullableValid(MyItem, Data)", "When changing a column to be non nullable, you must provide a default sql value to upgrade existing null data with.")]
    [StringLength(500)]
    public string DefaultSQLForNotNullable { get; set; }
    Property Value
    Type Description
    string

    Description

    A user friendly description, that the user can see when looking at this field.

    Declaration
    [StringLength(2000)]
    public string Description { get; set; }
    Property Value
    Type Description
    string

    EnumPropertyType

    The enum type of property in the .net class.

    Declaration
    [PropertyValidation("true", "LemonEdge.API.Entities.Design.CustomObjectPropertyValidateLinks.IsPropertyTypeValid(MyItem)", "The PropertyType and ColumnType are not compatible.")]
    [StringLength(500)]
    public string EnumPropertyType { get; set; }
    Property Value
    Type Description
    string

    Formula

    A formula that is run to determine the value of this property and is run whenever dependant properties change value

    Declaration
    public string Formula { get; set; }
    Property Value
    Type Description
    string

    IsDate

    If this property is a datetimeoffset this indicates if it only holds the date component or the date and time?

    Declaration
    public bool IsDate { get; set; }
    Property Value
    Type Description
    bool

    IsIndex

    A smallint that indicates this column should be used as an index column when in a grid indicating order

    Declaration
    public bool IsIndex { get; set; }
    Property Value
    Type Description
    bool

    IsLabel

    Indicates if this field holds the label to be used when referring to this record. This label is displayed in tab headers when looking at the entity, and in recent and favourite lists, etc.

    Declaration
    public bool IsLabel { get; set; }
    Property Value
    Type Description
    bool

    IsNullable

    Indicates if this field can legally hold a null value

    Declaration
    public bool IsNullable { get; set; }
    Property Value
    Type Description
    bool

    IsPartOfKey

    Every record has an internal globally unique identifier. However this check indicates if this property forms part of the key that makes these records unique - such as a Legal Name for a Company. These key fields will be used to uniquely identify records when importing/exporting and from other user identifiable methods.

    Declaration
    public bool IsPartOfKey { get; set; }
    Property Value
    Type Description
    bool

    IsShared

    Indicates this record is a shared record. Only the root account can edit items that are shared records

    Declaration
    public bool IsShared { get; set; }
    Property Value
    Type Description
    bool

    LinkDeleteWithRelationship

    Indicates you want this entity to be automatically deleted (in a cascading delete fashion) when the linked to entity is itself deleted.

    Declaration
    public bool LinkDeleteWithRelationship { get; set; }
    Property Value
    Type Description
    bool

    LinkExtendsType

    This indicates the entity has properties that extend the linked type.

    This is different from inheritance as it isn't an instance of the same object and can have its own permissions and so forth.However enabling this means you have a quick way of adding new fields to existing entities throughout the system.

    Declaration
    [PropertyValidation("MyItem.LinkExtendsType", "await LemonEdge.API.Entities.Design.CustomObjectPropertyValidateLinks.IsExtendedTypeValid(MyItem, Data)", "You can only have one custom property that is a relationship that extends another type per custom entity.")]
    public bool LinkExtendsType { get; set; }
    Property Value
    Type Description
    bool

    LinkInheritPermissions

    Indicates this entity should inherit permissions from the specified entity.

    Declaration
    [PropertyValidation("MyItem.LinkInheritPermissions", "await LemonEdge.API.Entities.Design.CustomObjectPropertyValidateLinks.IsPermissionValid(MyItem, Data)", "Either the custom object itself can have permissions, or only *one* custom property can be marked to inherit permissions via a relationship.")]
    public bool LinkInheritPermissions { get; set; }
    Property Value
    Type Description
    bool

    LinkPartOfParentSet

    Indicates this entity is part of a set of entities that this linked to entity is in also.

    For instance a Parent Item may have a Child Item with a relationship pointing to the Parent Item and this set to true. That would make the Child Item a part of this set and when exporting in xml the Child Item would be included as part of the set of data.

    Declaration
    public bool LinkPartOfParentSet { get; set; }
    Property Value
    Type Description
    bool

    LinkPreventAutoConstraint

    Prevent LemonEdge from creating constraints in sql for this relationship to enforce its validity. This can improve performance on certain bulk loading tables.

    Declaration
    public bool LinkPreventAutoConstraint { get; set; }
    Property Value
    Type Description
    bool

    LinkToItemInSet

    Indicates this linked to item is also part of a set, but not through a parent/child relationship and is just an associated item that may be the parent of its own set of data too.

    Declaration
    public bool LinkToItemInSet { get; set; }
    Property Value
    Type Description
    bool

    LinkToType

    The type of entity you want this relationship to link to

    Declaration
    [PropertyValidation("MyItem.LinkToType.HasValue", "await LemonEdge.API.Entities.Design.CustomObjectPropertyValidateLinks.IsRelationshipValid(MyItem, Data)", "The type of this property does not match the type of the property on the linked to object. If it is linking to the ID, it should be a SQL Type of uniqueidentifier with a Property Type of Guid.")]
    public Guid? LinkToType { get; set; }
    Property Value
    Type Description
    Guid?

    LinkToTypePropertyName

    The property on the target entity of this relationship that holds a uniquely identifying field.

    This is typically always ID - the internal global unique identifier.

    Declaration
    [PropertyValidation("MyItem.LinkToType.HasValue", "!string.IsNullOrEmpty(MyItem.LinkToTypePropertyName)", "You must select a PropertyName to link the relationship to if you have selected an entity this property links to.")]
    [StringLength(500)]
    public string LinkToTypePropertyName { get; set; }
    Property Value
    Type Description
    string

    OnPropertyChangeScript

    A statement that is run whenever this specified property changes. This is run within the OnPropertyChanged partial method on the class.

    Declaration
    public string OnPropertyChangeScript { get; set; }
    Property Value
    Type Description
    string

    PropertyName

    A unique (within this entity) name of the property for this field. This is the name of the property the class for this entity will have. Normally this is the same as the ColumnName, but can be different.

    Declaration
    [PropertyValidation("true", "!string.Equals(MyItem.PropertyName, \"AccountID\", StringComparison.CurrentCultureIgnoreCase)", "The AccountID name is a reserved word already used by the system, please use another.")]
    [PropertyValidation("true", "!string.Equals(MyItem.PropertyName, \"CanvasID\", StringComparison.CurrentCultureIgnoreCase)", "The CanvasID name is a reserved word already used by the system, please use another.")]
    [PropertyValidation("true", "!string.Equals(MyItem.PropertyName, \"ID\", StringComparison.CurrentCultureIgnoreCase)", "The ID name is a reserved word already used by the system, please use another.")]
    [PropertyValidation("true", "!string.Equals(MyItem.PropertyName, \"LastUpdated\", StringComparison.CurrentCultureIgnoreCase)", "The LastUpdated name is a reserved word already used by the system, please use another.")]
    [PropertyValidation("true", "!string.Equals(MyItem.PropertyName, \"ModifiedByUserID\", StringComparison.CurrentCultureIgnoreCase)", "The ModifiedByUserID name is a reserved word already used by the system, please use another.")]
    [DatabasePropertyValidation("true", "await LemonEdge.API.Entities.Design.CustomObjectPropertyValidateLinks.IsPropertyNameValid(MyItem, Data)", "The PropertyName is invalid.")]
    [Required(AllowEmptyStrings = false)]
    [FileSafeNameValidation]
    [StringLength(500)]
    public string PropertyName { get; set; }
    Property Value
    Type Description
    string

    PropertyType

    The type of property in the .net class.

    Declaration
    [Required(AllowEmptyStrings = false)]
    [PropertyValidation("true", "LemonEdge.API.Entities.Design.CustomObjectPropertyValidateLinks.IsPropertyTypeValid(MyItem)", "The PropertyType and ColumnType are not compatible.")]
    [StringLength(500)]
    public string PropertyType { get; set; }
    Property Value
    Type Description
    string

    UserFriendlyName

    The user friendly name of this custom object column - the name the user will see.

    Declaration
    [Required(AllowEmptyStrings = false)]
    [StringLength(500)]
    public string UserFriendlyName { get; set; }
    Property Value
    Type Description
    string

    ValidationFormula

    The validation formula to apply when this property changes. EValuations failing this check will prevent the changes being committed and will display the ValidationMessage.

    Declaration
    public string ValidationFormula { get; set; }
    Property Value
    Type Description
    string

    ValidationGateFormula

    If you are applying a ValidationFormula, you can optionally also apply a gate formula which will only evaluate the validation formula if this is true.

    Declaration
    public string ValidationGateFormula { get; set; }
    Property Value
    Type Description
    string

    ValidationMessage

    The validation formula to apply when this property changes. EValuations failing this check will prevent the changes being committed and will display the ValidationMessage.

    Declaration
    public string ValidationMessage { get; set; }
    Property Value
    Type Description
    string

    Methods

    CopyFromEntity(IBaseEntity)

    Declaration
    protected override void CopyFromEntity(IBaseEntity src)
    Parameters
    Type Name Description
    IBaseEntity src
    Overrides
    BaseEntity.CopyFromEntity(IBaseEntity)

    CopyFromSource(ICustomObjectProperty)

    Updates all properties in this item to have the same properties as the source object.

    Declaration
    public void CopyFromSource(ICustomObjectProperty source)
    Parameters
    Type Name Description
    ICustomObjectProperty source

    The source object to copy all values from.

    GetFrameworkTypeType()

    Declaration
    public Type GetFrameworkTypeType()
    Returns
    Type Description
    Type

    SetFrameworkTypeType(Type)

    Declaration
    public void SetFrameworkTypeType(Type type)
    Parameters
    Type Name Description
    Type type

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    ICustomObjectProperty
    IShareAcrossAccounts
    IBaseEntity
    IEquatable<T>
    INotifyPropertyChanged
    INotifyPropertyChanging
    ICloneableAsync
    ICanTrackProperties
    ICloneableAsync<T>

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.