I created a DAC field in a custom DAC as follows.
#region ParameterNbr
[PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Parameter Nbr")]
[PXSelector(typeof(customDAC.parameterNbr), SubstituteKey = typeof(customDAC.description))]
public virtual string ParameterNbr { get; set; }
public abstract class parameterNbr : PX.Data.BQL.BqlString.Field<parameterNbr> { }
#endregion
When the length of the customDAC.description, which is the substitute key, exceeds 15, the description value is saved in the database instead of the customDAC.parameterNbr. If the length is equal to or less than 15, the customDAC.parameterNbr is saved as usual. I changed the length to 10, but the same behavior persisted. I want to show the customDAC.description value in the user interface and save the customDAC.parameterNbr value in the DAC.
How can I solve this?
Any detailed instructions, tips, or code snippets would be greatly appreciated. Thank you!
