Class ErpFieldRow
Store the metadata describing the fields that belong to an actor/connection combination, as described by the Erp Connector
Row Object for table 'ErpField'. Row objects correspond directly to database tables, and one
instance of a row object represents one row in the corresponding table in the database.
Inherited Members
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public class ErpFieldRow : TableRowBase, INestedPersist, ISoDataLookup, ISentryIgnorable, ISoItem
Remarks
Row objects can be created in several ways.
- Use the static CreateNew() method to create a new, empty object. After populating it with values,
you call the
method and a corresponding row in the database is created, and the objects' primary key field updated. This is the preferred way to insert new rows into the database. - You can create a (nested) ErpFieldRow ErpFieldRow.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(ErpFieldRow.CustomSearch) method to apply the query to the database and obtain the result as a Row object. This is how you select existing rows from the database when you have a query that does not correspond to any of the existing database indexes.
- For each unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
Note that if you try to fetch a row that does not exist (for instance, by using the primary key index and specifying a primary key that does
not exist in the database), you will get a Row object with the
and properties set to true. Such a Row object is called a 'ghost' and cannot be updated, saved or deleted. You can also get a ghost if the row does exist in the database, but the Sentry system denies Select rights to the row. - Finally, if you have an SoDataReader that contains ALL the fields of the table, and you have the ErpFieldTableInfo instance used in the query behind the reader, you can use the static GetFromReader(SoDataReader, ErpFieldTableInfo) method to create a new row object from the reader and the table info. This is useful when you have a larger, more complex query, for instance one that joins a number of tables, and you wish to use Row objects to process the result set. If your result set corresponds to an entity, consider using the corresponding Entity layer object instead, since entities automatically handle ID allocation and mapping, rights, and other higher-level aspects.
Unique indexes on table ErpField are:
Index fields | Nested index class name |
---|
Constructors
ErpFieldRow(ErpFieldRow.ErpFieldRowIdxBase)
Constructor for the class taking an index as argument. Store the metadata describing the fields that belong to an actor/connection combination, as described by the Erp Connector
Declaration
protected ErpFieldRow(ErpFieldRow.ErpFieldRowIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
ErpFieldRow.ErpFieldRowIdxBase | idx | The index representing a SELECT command to the database. |
Fields
_currentAccess
Current value, see property Access.
Declaration
protected FieldAccess _currentAccess
Field Value
Type | Description |
---|---|
FieldAccess |
_currentCrmFieldKey
Current value, see property CrmFieldKey.
Declaration
protected string _currentCrmFieldKey
Field Value
Type | Description |
---|---|
String |
_currentDefaultValue
Current value, see property DefaultValue.
Declaration
protected string _currentDefaultValue
Field Value
Type | Description |
---|---|
String |
_currentDisplayDescription
Current value, see property DisplayDescription.
Declaration
protected string _currentDisplayDescription
Field Value
Type | Description |
---|---|
String |
_currentDisplayName
Current value, see property DisplayName.
Declaration
protected string _currentDisplayName
Field Value
Type | Description |
---|---|
String |
_currentErpConnectionActorTypeId
Current value, see property ErpConnectionActorTypeId.
Declaration
protected int _currentErpConnectionActorTypeId
Field Value
Type | Description |
---|---|
Int32 |
_currentErpFieldId
Current value, see property ErpFieldId.
Declaration
protected int _currentErpFieldId
Field Value
Type | Description |
---|---|
Int32 |
_currentErpFieldKey
Current value, see property ErpFieldKey.
Declaration
protected string _currentErpFieldKey
Field Value
Type | Description |
---|---|
String |
_currentFieldType
Current value, see property FieldType.
Declaration
protected FieldMetadataType _currentFieldType
Field Value
Type | Description |
---|---|
FieldMetadataType |
_currentFirstSyncDefaultValue
Current value, see property FirstSyncDefaultValue.
Declaration
protected string _currentFirstSyncDefaultValue
Field Value
Type | Description |
---|---|
String |
_currentHasFirstSyncDefaultValue
Current value, see property HasFirstSyncDefaultValue.
Declaration
protected short _currentHasFirstSyncDefaultValue
Field Value
Type | Description |
---|---|
Int16 |
_currentListName
Current value, see property ListName.
Declaration
protected string _currentListName
Field Value
Type | Description |
---|---|
String |
_currentListReference
Current value, see property ListReference.
Declaration
protected string _currentListReference
Field Value
Type | Description |
---|---|
String |
_currentMandatory
Current value, see property Mandatory.
Declaration
protected short _currentMandatory
Field Value
Type | Description |
---|---|
Int16 |
_currentMaxLength
Current value, see property MaxLength.
Declaration
protected int _currentMaxLength
Field Value
Type | Description |
---|---|
Int32 |
_currentMissingInERP
Current value, see property MissingInERP.
Declaration
protected short _currentMissingInERP
Field Value
Type | Description |
---|---|
Int16 |
_currentPromptUser
Current value, see property PromptUser.
Declaration
protected short _currentPromptUser
Field Value
Type | Description |
---|---|
Int16 |
_currentRank
Current value, see property Rank.
Declaration
protected int _currentRank
Field Value
Type | Description |
---|---|
Int32 |
_currentRegistered
Current value, see property Registered.
Declaration
protected DateTime _currentRegistered
Field Value
Type | Description |
---|---|
DateTime |
_currentRegisteredAssociateId
Current value, see property RegisteredAssociateId.
Declaration
protected int _currentRegisteredAssociateId
Field Value
Type | Description |
---|---|
Int32 |
_currentShowInGui
Current value, see property ShowInGui.
Declaration
protected short _currentShowInGui
Field Value
Type | Description |
---|---|
Int16 |
_currentShowInSearch
Current value, see property ShowInSearch.
Declaration
protected short _currentShowInSearch
Field Value
Type | Description |
---|---|
Int16 |
_currentSyncToCrm
Current value, see property SyncToCrm.
Declaration
protected short _currentSyncToCrm
Field Value
Type | Description |
---|---|
Int16 |
_currentSyncToErp
Current value, see property SyncToErp.
Declaration
protected short _currentSyncToErp
Field Value
Type | Description |
---|---|
Int16 |
_currentUpdated
Current value, see property Updated.
Declaration
protected DateTime _currentUpdated
Field Value
Type | Description |
---|---|
DateTime |
_currentUpdatedAssociateId
Current value, see property UpdatedAssociateId.
Declaration
protected int _currentUpdatedAssociateId
Field Value
Type | Description |
---|---|
Int32 |
_currentUpdatedCount
Current value, see property UpdatedCount.
Declaration
protected short _currentUpdatedCount
Field Value
Type | Description |
---|---|
Int16 |
_persistedAccess
Persisted value, see property Access.
Declaration
protected FieldAccess _persistedAccess
Field Value
Type | Description |
---|---|
FieldAccess |
_persistedCrmFieldKey
Persisted value, see property CrmFieldKey.
Declaration
protected string _persistedCrmFieldKey
Field Value
Type | Description |
---|---|
String |
_persistedDefaultValue
Persisted value, see property DefaultValue.
Declaration
protected string _persistedDefaultValue
Field Value
Type | Description |
---|---|
String |
_persistedDisplayDescription
Persisted value, see property DisplayDescription.
Declaration
protected string _persistedDisplayDescription
Field Value
Type | Description |
---|---|
String |
_persistedDisplayName
Persisted value, see property DisplayName.
Declaration
protected string _persistedDisplayName
Field Value
Type | Description |
---|---|
String |
_persistedErpConnectionActorTypeId
Persisted value, see property ErpConnectionActorTypeId.
Declaration
protected int _persistedErpConnectionActorTypeId
Field Value
Type | Description |
---|---|
Int32 |
_persistedErpFieldId
Persisted value, see property ErpFieldId.
Declaration
protected int _persistedErpFieldId
Field Value
Type | Description |
---|---|
Int32 |
_persistedErpFieldKey
Persisted value, see property ErpFieldKey.
Declaration
protected string _persistedErpFieldKey
Field Value
Type | Description |
---|---|
String |
_persistedFieldType
Persisted value, see property FieldType.
Declaration
protected FieldMetadataType _persistedFieldType
Field Value
Type | Description |
---|---|
FieldMetadataType |
_persistedFirstSyncDefaultValue
Persisted value, see property FirstSyncDefaultValue.
Declaration
protected string _persistedFirstSyncDefaultValue
Field Value
Type | Description |
---|---|
String |
_persistedHasFirstSyncDefaultValue
Persisted value, see property HasFirstSyncDefaultValue.
Declaration
protected short _persistedHasFirstSyncDefaultValue
Field Value
Type | Description |
---|---|
Int16 |
_persistedListName
Persisted value, see property ListName.
Declaration
protected string _persistedListName
Field Value
Type | Description |
---|---|
String |
_persistedListReference
Persisted value, see property ListReference.
Declaration
protected string _persistedListReference
Field Value
Type | Description |
---|---|
String |
_persistedMandatory
Persisted value, see property Mandatory.
Declaration
protected short _persistedMandatory
Field Value
Type | Description |
---|---|
Int16 |
_persistedMaxLength
Persisted value, see property MaxLength.
Declaration
protected int _persistedMaxLength
Field Value
Type | Description |
---|---|
Int32 |
_persistedMissingInERP
Persisted value, see property MissingInERP.
Declaration
protected short _persistedMissingInERP
Field Value
Type | Description |
---|---|
Int16 |
_persistedPromptUser
Persisted value, see property PromptUser.
Declaration
protected short _persistedPromptUser
Field Value
Type | Description |
---|---|
Int16 |
_persistedRank
Persisted value, see property Rank.
Declaration
protected int _persistedRank
Field Value
Type | Description |
---|---|
Int32 |
_persistedRegistered
Persisted value, see property Registered.
Declaration
protected DateTime _persistedRegistered
Field Value
Type | Description |
---|---|
DateTime |
_persistedRegisteredAssociateId
Persisted value, see property RegisteredAssociateId.
Declaration
protected int _persistedRegisteredAssociateId
Field Value
Type | Description |
---|---|
Int32 |
_persistedShowInGui
Persisted value, see property ShowInGui.
Declaration
protected short _persistedShowInGui
Field Value
Type | Description |
---|---|
Int16 |
_persistedShowInSearch
Persisted value, see property ShowInSearch.
Declaration
protected short _persistedShowInSearch
Field Value
Type | Description |
---|---|
Int16 |
_persistedSyncToCrm
Persisted value, see property SyncToCrm.
Declaration
protected short _persistedSyncToCrm
Field Value
Type | Description |
---|---|
Int16 |
_persistedSyncToErp
Persisted value, see property SyncToErp.
Declaration
protected short _persistedSyncToErp
Field Value
Type | Description |
---|---|
Int16 |
_persistedUpdated
Persisted value, see property Updated.
Declaration
protected DateTime _persistedUpdated
Field Value
Type | Description |
---|---|
DateTime |
_persistedUpdatedAssociateId
Persisted value, see property UpdatedAssociateId.
Declaration
protected int _persistedUpdatedAssociateId
Field Value
Type | Description |
---|---|
Int32 |
_persistedUpdatedCount
Persisted value, see property UpdatedCount.
Declaration
protected short _persistedUpdatedCount
Field Value
Type | Description |
---|---|
Int16 |
Properties
Access
.NET type: FieldAccess. Access restrictions for the field
Declaration
public virtual FieldAccess Access { get; set; }
Property Value
Type | Description |
---|---|
FieldAccess |
Remarks
Original type in dictionary: Enum.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
CrmFieldKey
.NET type: string. The CRM field name, as implemented by the Sync entities
Declaration
public virtual string CrmFieldKey { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Original type in dictionary: String[255].
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
DefaultValue
.NET type: string. Default value, stored using CultureDataFormatter format if it is not a string
Declaration
public virtual string DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Original type in dictionary: String[255].
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
DisplayDescription
.NET type: string. Tooltip for the field name.
Declaration
public virtual string DisplayDescription { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Original type in dictionary: String[255].
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
DisplayName
.NET type: string. Localized field name – shown in the GUI as the label for the control.
Declaration
public virtual string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Original type in dictionary: String[255].
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
ErpConnectionActorTypeId
.NET type: int. Link to Erp Connection/Actor type
Declaration
public virtual int ErpConnectionActorTypeId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Original type in dictionary: FK.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
ErpFieldId
.NET type: int. Primary key
Declaration
public virtual int ErpFieldId { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Original type in dictionary: PK.
This field is the primary key and can only be read, never written.
This field is not protected by the Sentry system, and can always be read
ErpFieldKey
.NET type: string. The ERP field key
Declaration
public virtual string ErpFieldKey { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Original type in dictionary: String[255].
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
ErpFieldTableInfo
Get the ErpFieldTableInfo object associated with the row.
Declaration
public ErpFieldTableInfo ErpFieldTableInfo { get; }
Property Value
Type | Description |
---|---|
ErpFieldTableInfo |
FieldType
.NET type: FieldMetadataType. Field type
Declaration
public virtual FieldMetadataType FieldType { get; set; }
Property Value
Type | Description |
---|---|
FieldMetadataType |
Remarks
Original type in dictionary: Enum.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
FirstSyncDefaultValue
.NET type: string. The default value to be set, can be blank
Declaration
public virtual string FirstSyncDefaultValue { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Original type in dictionary: String[255].
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
HasFirstSyncDefaultValue
.NET type: short. Should a default value be set on first sync
Declaration
public virtual short HasFirstSyncDefaultValue { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: Bool.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
InnerFieldValuePairs
The values of all the fields in the row.
The first field is the primary key.
The index of the value corresponds to the name
of the field returned from the Fields property.
Declaration
protected override ArgumentParameterCollection InnerFieldValuePairs { get; }
Property Value
Type | Description |
---|---|
ArgumentParameterCollection |
Overrides
InnerPrimaryKey
The primary key needed to decide which specific row to alter with the current sql-command.
Declaration
protected override FieldInfo InnerPrimaryKey { get; }
Property Value
Type | Description |
---|---|
FieldInfo |
Overrides
InnerPrimaryKeyValue
The actual value the primary key must have.
Declaration
protected override Parameter InnerPrimaryKeyValue { get; }
Property Value
Type | Description |
---|---|
Parameter |
Overrides
IsDirty
Is the row dirty, e.g. been modified since the last time it was saved to the database.
Declaration
public override bool IsDirty { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
IsNew
Is this object new, meaning that it does not exist in the database.
Declaration
public override bool IsNew { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Item[String]
Get or set a value based on the name of the field.
Declaration
public override object this[string fieldName] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | Name of the field in the database |
Property Value
Type | Description |
---|---|
Object | Value of the field. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the field is not known. |
ListName
.NET type: string. The ERP list name, if the field has a list of values supplied by the ERP Connector
Declaration
public virtual string ListName { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Original type in dictionary: String[255].
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
ListReference
.NET type: string. Reference to CRM list, if a mapping exists. Format: table=<table name>[&<extra id>=<value>], to make it independent of actual table numbers
Declaration
public virtual string ListReference { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Original type in dictionary: String[255].
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
Mandatory
.NET type: short. Should the user be forced to set a value (the Erp Connector may declare fields mandatory as well)
Declaration
public virtual short Mandatory { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: Bool.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
MaxLength
.NET type: int. Maximum size of the field, if there is a limit
Declaration
public virtual int MaxLength { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Original type in dictionary: Int.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
MissingInERP
.NET type: short. Set to true if this field has previously been defined, but was no longer in the 'supported fields' response from the connector. This typically happens if the target ERP system changes, and means the field needs to be unmapped.
Declaration
public virtual short MissingInERP { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: Bool.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
PromptUser
.NET type: short. Should the field be shown in the first-sync GUI; independent of whether a default value should be set
Declaration
public virtual short PromptUser { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: Bool.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
Rank
.NET type: int. Rank order of lines in GUI, relevant if ShowInGui is true
Declaration
public virtual int Rank { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Original type in dictionary: Int.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
Registered
.NET type: DateTime. Registered when in UTC
Declaration
public virtual DateTime Registered { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Remarks
Original type in dictionary: UtcDateTime.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
RegisteredAssociateId
.NET type: int. Registered by whom
Declaration
public virtual int RegisteredAssociateId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Original type in dictionary: FK.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
ShowInGui
.NET type: short. Should this field be shown as a (read-only!) field in the CRM Gui
Declaration
public virtual short ShowInGui { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: Bool.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
ShowInSearch
.NET type: short. Should this field be shown in searches
Declaration
public virtual short ShowInSearch { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: Bool.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
SyncToCrm
.NET type: short. Should value changes in ERP be automatically transferred to CRM
Declaration
public virtual short SyncToCrm { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: Bool.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
SyncToErp
.NET type: short. Should value changes in CRM be automatically transferred to ERP
Declaration
public virtual short SyncToErp { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: Bool.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
TableInfo
Get the TableInfo for the table.
Declaration
public override TableInfo TableInfo { get; }
Property Value
Type | Description |
---|---|
TableInfo | The TableInfo for the table. |
Overrides
Updated
.NET type: DateTime. Last updated when in UTC
Declaration
public virtual DateTime Updated { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Remarks
Original type in dictionary: UtcDateTime.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
UpdatedAssociateId
.NET type: int. Last updated by whom
Declaration
public virtual int UpdatedAssociateId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Original type in dictionary: FK.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
UpdatedCount
.NET type: short. Number of updates made to this record
Declaration
public virtual short UpdatedCount { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Remarks
Original type in dictionary: UShort.
Setting this field to a new value will not affect the Sentry calculations and your rights
This field is not protected by the Sentry system, and can always be read
This field is not protected by the Sentry system, and can be written to unless other restrictions prevent it
Methods
CreateNew()
Create a new instance of the ErpFieldRow object. Store the metadata describing the fields that belong to an actor/connection combination, as described by the Erp Connector
Declaration
public static ErpFieldRow CreateNew()
Returns
Type | Description |
---|---|
ErpFieldRow | A new instance of the ErpFieldRow object. |
GetFromCustomSearch(ErpFieldRow.CustomSearch)
Create a new instance of the ErpFieldRow object, and populate it with data from a custom search. If the search returns no results, an object with IsNew will be returned; if the result contains one row, an object representing that row will be returned. If the result contains more than one row, the first row will be used and the rest discarded (there is no way of detecting this situation).
Declaration
public static ErpFieldRow GetFromCustomSearch(ErpFieldRow.CustomSearch query)
Parameters
Type | Name | Description |
---|---|---|
ErpFieldRow.CustomSearch | query | The custom search to execute against the database |
Returns
Type | Description |
---|---|
ErpFieldRow | A new instance of the ErpFieldRow object, reflecting the result of the query. |
GetFromIdxErpConnectionActorTypeIdErpFieldKey(Int32, String)
Create a new instance of the ErpFieldRow object, by querying the database table via the index 'IErpConnectionActorTypeIdErpFieldKey'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static ErpFieldRow GetFromIdxErpConnectionActorTypeIdErpFieldKey(int erpConnectionActorTypeId, string erpFieldKey)
Parameters
Type | Name | Description |
---|---|---|
Int32 | erpConnectionActorTypeId | |
String | erpFieldKey |
Returns
Type | Description |
---|---|
ErpFieldRow | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the ErpField table. Non-unique indexes have corresponding inner classes and methods in the ErpFieldRows collection, since they may return more than one row.
GetFromIdxErpFieldId(Int32)
Create a new instance of the ErpFieldRow object, by querying the database table via the index 'IDXErpFieldId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static ErpFieldRow GetFromIdxErpFieldId(int erpFieldId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | erpFieldId |
Returns
Type | Description |
---|---|
ErpFieldRow | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the ErpField table. Non-unique indexes have corresponding inner classes and methods in the ErpFieldRows collection, since they may return more than one row.
GetFromReader(SoDataReader, ErpFieldTableInfo)
Create a new instance of the ErpFieldRow object, and populate it with data from a reader/tableinfo. If the reader has DBNull as the current value of the primary key field, an unpopulated object with IsNew == true will be returned. If any fields are missing or one of the non-primary key fields is DBNull, an exception will be thrown. Store the metadata describing the fields that belong to an actor/connection combination, as described by the Erp Connector
Declaration
public static ErpFieldRow GetFromReader(SoDataReader reader, ErpFieldTableInfo tableInfo)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | SoDataReader positioned to a valid database row. |
ErpFieldTableInfo | tableInfo | ErpFieldTableInfo instance used in the query that is the source of the reader. The fields used from the reader will be those owned by this tableinfo object. |
Returns
Type | Description |
---|---|
ErpFieldRow | A new instance of the ErpFieldRow object. |
GetPersistedFieldValue(FieldInfo)
Get the persisted value of a field.
Declaration
public override object GetPersistedFieldValue(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | Specification of a field |
Returns
Type | Description |
---|---|
Object | Field value, such as an int, DateTime, string ... Null can be returned if the value is not known. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the field is not known. |
InternalSetValue(String, Object)
Declaration
protected override void InternalSetValue(string fieldName, object value)
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | |
Object | value |
Overrides
IsPersistedFieldValueKnown(FieldInfo)
Check if the persisted value for a field is known.
Declaration
public override bool IsPersistedFieldValueKnown(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | Specification of a field |
Returns
Type | Description |
---|---|
Boolean | True if the value is known and sentry permits read. |
Overrides
OnLoad(SoDataReader, TableInfo)
Fill the object with data returned from the database.
Declaration
protected override void OnLoad(SoDataReader reader, TableInfo tableInfo)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | Object holding the data returned from the database. |
TableInfo | tableInfo | The TableInfo used for the SELECT statement. |
Overrides
OnSave(BatchSave)
Add the object to the BatchSave list if it needs saving.
Declaration
protected override void OnSave(BatchSave batchSave)
Parameters
Type | Name | Description |
---|---|---|
BatchSave | batchSave | Collection of objects to be saved within the transaction. |
Overrides
Remarks
Classes overriding this method should call it.
OnSaved(Boolean)
Method called after the save operation has been performed.
Declaration
protected override void OnSaved(bool bSucceeded)
Parameters
Type | Name | Description |
---|---|---|
Boolean | bSucceeded | True if the save operation succeeded (e.g. transaction committed), or false if the save operation failed (e.g. transaction rolled back) |
Overrides
Reset()
Reset the changes made on the object.
Declaration
protected override void Reset()
Overrides
Remarks
If the row is not persisted to the database (e.g. IsNew is true), all the values will be reset. If the row has been persisted to or loaded from the database, the properties will be set to those of the last persisted or loaded values.
SetDefaults(DefaulterStrategy)
Set default values for the row.
Declaration
public override void SetDefaults(DefaulterStrategy strategy)
Parameters
Type | Name | Description |
---|---|---|
DefaulterStrategy | strategy | Strategy used when applying default values; values depend on where we are in the Create/Fetch/Populate/Save cycle |
Overrides
SetPrimaryKey(Int32)
Set the primary key for the row.
Declaration
protected override void SetPrimaryKey(int primaryKey)
Parameters
Type | Name | Description |
---|---|---|
Int32 | primaryKey | The new primary key for the row. |
Overrides
SetRowAsNew()
Declaration
public override void SetRowAsNew()
Overrides
ToString()
ToString method intended for debugging, returns a string that displays the object type, new/dirty status, primary key and the string fields
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Validate(RowValidator)
Validate this row.
Declaration
public override void Validate(RowValidator rowValidator)
Parameters
Type | Name | Description |
---|---|---|
RowValidator | rowValidator | RowValidator for inserting the result of the validation |
Overrides
Events
_onAccessChange
Change envent for property Access; field is of .NET type short.
Declaration
protected event OnFieldChange<FieldAccess> _onAccessChange
Event Type
Type | Description |
---|---|
OnFieldChange<FieldAccess> |
_onCrmFieldKeyChange
Change envent for property CrmFieldKey; field is of .NET type string.
Declaration
protected event OnFieldChange<string> _onCrmFieldKeyChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
_onDefaultValueChange
Change envent for property DefaultValue; field is of .NET type string.
Declaration
protected event OnFieldChange<string> _onDefaultValueChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
_onDisplayDescriptionChange
Change envent for property DisplayDescription; field is of .NET type string.
Declaration
protected event OnFieldChange<string> _onDisplayDescriptionChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
_onDisplayNameChange
Change envent for property DisplayName; field is of .NET type string.
Declaration
protected event OnFieldChange<string> _onDisplayNameChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
_onErpConnectionActorTypeIdChange
Change envent for property ErpConnectionActorTypeId; field is of .NET type int.
Declaration
protected event OnFieldChange<int> _onErpConnectionActorTypeIdChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
_onErpFieldKeyChange
Change envent for property ErpFieldKey; field is of .NET type string.
Declaration
protected event OnFieldChange<string> _onErpFieldKeyChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
_onFieldTypeChange
Change envent for property FieldType; field is of .NET type short.
Declaration
protected event OnFieldChange<FieldMetadataType> _onFieldTypeChange
Event Type
Type | Description |
---|---|
OnFieldChange<FieldMetadataType> |
_onFirstSyncDefaultValueChange
Change envent for property FirstSyncDefaultValue; field is of .NET type string.
Declaration
protected event OnFieldChange<string> _onFirstSyncDefaultValueChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
_onHasFirstSyncDefaultValueChange
Change envent for property HasFirstSyncDefaultValue; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onHasFirstSyncDefaultValueChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
_onListNameChange
Change envent for property ListName; field is of .NET type string.
Declaration
protected event OnFieldChange<string> _onListNameChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
_onListReferenceChange
Change envent for property ListReference; field is of .NET type string.
Declaration
protected event OnFieldChange<string> _onListReferenceChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
_onMandatoryChange
Change envent for property Mandatory; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onMandatoryChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
_onMaxLengthChange
Change envent for property MaxLength; field is of .NET type int.
Declaration
protected event OnFieldChange<int> _onMaxLengthChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
_onMissingInERPChange
Change envent for property MissingInERP; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onMissingInERPChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
_onPromptUserChange
Change envent for property PromptUser; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onPromptUserChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
_onRankChange
Change envent for property Rank; field is of .NET type int.
Declaration
protected event OnFieldChange<int> _onRankChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
_onRegisteredAssociateIdChange
Change envent for property RegisteredAssociateId; field is of .NET type int.
Declaration
protected event OnFieldChange<int> _onRegisteredAssociateIdChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
_onRegisteredChange
Change envent for property Registered; field is of .NET type DateTime.
Declaration
protected event OnFieldChange<DateTime> _onRegisteredChange
Event Type
Type | Description |
---|---|
OnFieldChange<DateTime> |
_onShowInGuiChange
Change envent for property ShowInGui; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onShowInGuiChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
_onShowInSearchChange
Change envent for property ShowInSearch; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onShowInSearchChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
_onSyncToCrmChange
Change envent for property SyncToCrm; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onSyncToCrmChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
_onSyncToErpChange
Change envent for property SyncToErp; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onSyncToErpChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
_onUpdatedAssociateIdChange
Change envent for property UpdatedAssociateId; field is of .NET type int.
Declaration
protected event OnFieldChange<int> _onUpdatedAssociateIdChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
_onUpdatedChange
Change envent for property Updated; field is of .NET type DateTime.
Declaration
protected event OnFieldChange<DateTime> _onUpdatedChange
Event Type
Type | Description |
---|---|
OnFieldChange<DateTime> |
_onUpdatedCountChange
Change envent for property UpdatedCount; field is of .NET type short.
Declaration
protected event OnFieldChange<short> _onUpdatedCountChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnAccessChange
Event raised when Access is changing.
Declaration
public event OnFieldChange<FieldAccess> OnAccessChange
Event Type
Type | Description |
---|---|
OnFieldChange<FieldAccess> |
OnCrmFieldKeyChange
Event raised when CrmFieldKey is changing.
Declaration
public event OnFieldChange<string> OnCrmFieldKeyChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
OnDefaultValueChange
Event raised when DefaultValue is changing.
Declaration
public event OnFieldChange<string> OnDefaultValueChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
OnDisplayDescriptionChange
Event raised when DisplayDescription is changing.
Declaration
public event OnFieldChange<string> OnDisplayDescriptionChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
OnDisplayNameChange
Event raised when DisplayName is changing.
Declaration
public event OnFieldChange<string> OnDisplayNameChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
OnErpConnectionActorTypeIdChange
Event raised when ErpConnectionActorTypeId is changing.
Declaration
public event OnFieldChange<int> OnErpConnectionActorTypeIdChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
OnErpFieldKeyChange
Event raised when ErpFieldKey is changing.
Declaration
public event OnFieldChange<string> OnErpFieldKeyChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
OnFieldTypeChange
Event raised when FieldType is changing.
Declaration
public event OnFieldChange<FieldMetadataType> OnFieldTypeChange
Event Type
Type | Description |
---|---|
OnFieldChange<FieldMetadataType> |
OnFirstSyncDefaultValueChange
Event raised when FirstSyncDefaultValue is changing.
Declaration
public event OnFieldChange<string> OnFirstSyncDefaultValueChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
OnHasFirstSyncDefaultValueChange
Event raised when HasFirstSyncDefaultValue is changing.
Declaration
public event OnFieldChange<short> OnHasFirstSyncDefaultValueChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnListNameChange
Event raised when ListName is changing.
Declaration
public event OnFieldChange<string> OnListNameChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
OnListReferenceChange
Event raised when ListReference is changing.
Declaration
public event OnFieldChange<string> OnListReferenceChange
Event Type
Type | Description |
---|---|
OnFieldChange<String> |
OnMandatoryChange
Event raised when Mandatory is changing.
Declaration
public event OnFieldChange<short> OnMandatoryChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnMaxLengthChange
Event raised when MaxLength is changing.
Declaration
public event OnFieldChange<int> OnMaxLengthChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
OnMissingInERPChange
Event raised when MissingInERP is changing.
Declaration
public event OnFieldChange<short> OnMissingInERPChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnPromptUserChange
Event raised when PromptUser is changing.
Declaration
public event OnFieldChange<short> OnPromptUserChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnRankChange
Event raised when Rank is changing.
Declaration
public event OnFieldChange<int> OnRankChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
OnRegisteredAssociateIdChange
Event raised when RegisteredAssociateId is changing.
Declaration
public event OnFieldChange<int> OnRegisteredAssociateIdChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
OnRegisteredChange
Event raised when Registered is changing.
Declaration
public event OnFieldChange<DateTime> OnRegisteredChange
Event Type
Type | Description |
---|---|
OnFieldChange<DateTime> |
OnShowInGuiChange
Event raised when ShowInGui is changing.
Declaration
public event OnFieldChange<short> OnShowInGuiChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnShowInSearchChange
Event raised when ShowInSearch is changing.
Declaration
public event OnFieldChange<short> OnShowInSearchChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnSyncToCrmChange
Event raised when SyncToCrm is changing.
Declaration
public event OnFieldChange<short> OnSyncToCrmChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnSyncToErpChange
Event raised when SyncToErp is changing.
Declaration
public event OnFieldChange<short> OnSyncToErpChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |
OnUpdatedAssociateIdChange
Event raised when UpdatedAssociateId is changing.
Declaration
public event OnFieldChange<int> OnUpdatedAssociateIdChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int32> |
OnUpdatedChange
Event raised when Updated is changing.
Declaration
public event OnFieldChange<DateTime> OnUpdatedChange
Event Type
Type | Description |
---|---|
OnFieldChange<DateTime> |
OnUpdatedCountChange
Event raised when UpdatedCount is changing.
Declaration
public event OnFieldChange<short> OnUpdatedCountChange
Event Type
Type | Description |
---|---|
OnFieldChange<Int16> |