Hi
I have created a custom table consisting only of a USERID and DIMENSIONVALUE. (RecId of the DimensionAttributeValue.RecId).
What is the correct way to create a DataEntity to be able to import records into this table but allowing the user to indicate the DisplayValue and not the recid of the DimensionValue. I have created a dataEntity and also added code to defaultrow() and persistEntity but the DimensionValue is always 0 when it is imported.
public void defaultRow() { super(); if (!this.DimensionValue) { this.DimensionValue = DimensionAttributeValue::findByDimensionAttributeAndValue(DimensionAttribute::find(ACCRecSecParameters::find().DimensionAttributeRecId),this.DisplayValue,false,false).RecId; } } ///<summary> ///</summary> ///<param name = /_entityCtx/></param> public void persistEntity(DataEntityRuntimeContext _entityCtx) { this.skipDataSourceValidateField(fieldNum(ACCRecSecUserMappingEntity, DimensionValue), true); if (_entityCtx.getDatabaseOperation() == DataEntityDatabaseOperation::Insert) { this.DimensionValue = DimensionAttributeValue::findByDimensionAttributeAndValue(DimensionAttribute::find(ACCRecSecParameters::find().DimensionAttributeRecId),this.DisplayValue,false,false).RecId; } super(_entityCtx); }