I have created a DAC with two keys and an Identity field. I can view and edit existing records fine, however when I create a new record and enter in a new key value as soon as I leave the field it blanks. Both Key fields blank after I focus is lost.
Any Ideal?
[Serializable]
[PXCacheName("MLS Listing")]
[PXPrimaryGraph(typeof(MLSListingList))]
public class GPMLSListing : PXBqlTable, IBqlTable
{
public class PK : PrimaryKeyOf<GPMLSListing>.By<address1, postalCode>
{
public static GPMLSListing Find(PXGraph graph, string address1, string postalCode) => FindBy(graph, address1, postalCode);
}
#region ListingID
[PXDBIdentity( FieldName = "Property ID")]
//[PXSelector(typeof(Search<address1>), ValidateValue = false)]
public virtual int? ListingID { get; set; }
public abstract class listingID : PX.Data.BQL.BqlInt.Field<listingID> { }
#endregion
#region Selected
[PXBool]
[PXUIField(DisplayName = "Selected")]
public virtual bool? Selected { get; set; }
public abstract class selected : BqlType<IBqlBool, bool>.Field<selected> { }
#endregion
#region Address1
[PXDBString(50, IsKey = true, IsUnicode = true, InputMask = "")]
[PXDefault]
[PXUIField(DisplayName = "Address")]
//[PXCheckUnique(Where = typeof(Where<address1, Equal<Current<address1>>, And<postalCode, Equal<Current<postalCode>>>>))]
//[PXSelector(typeof(Search<address1>), ValidateValue = false)]
public virtual string Address1 { get; set; }
public abstract class address1 : PX.Data.BQL.BqlString.Field<address1> { }
#endregion
#region PostalCode
[PXDBString(20, IsKey = true)]
[PXUIField(DisplayName = "Zip")]
[PXZipValidation(typeof(Country.zipCodeRegexp), typeof(Country.zipCodeMask), typeof(country))]
//[PXSelector(typeof(Search<postalCode>), ValidateValue = false)]
[PXPersonalDataField]
public virtual string PostalCode { get; set; }
public abstract class postalCode : PX.Data.BQL.BqlString.Field<postalCode> { }
#endregion
#region City
[PXDBString(50, IsUnicode = true)]
[PXDefault]
[PXUIField(DisplayName = "City", Visibility = PXUIVisibility.SelectorVisible)]
public virtual string City { get; set; }
public abstract class city : PX.Data.BQL.BqlString.Field<city> { }
#endregion
#region State
[PXDBString(50, IsUnicode = true)]
[PXUIField(DisplayName = "State")]
[State(typeof(country))]
public virtual string State { get; set; }
public abstract class state : PX.Data.BQL.BqlString.Field<state> { }
#endregion
}