Hello experts,
I have been trying to generate a DAC using the below mentioned steps:

But upon publishing the following validation error is triggered:

Hello experts,
I have been trying to generate a DAC using the below mentioned steps:

But upon publishing the following validation error is triggered:

Best answer by MoulaliShaik79
Hi
Please remove the spaces “Allergen Name”
public virtual string AllergenName should be like this.
Use the below one:
Note: Change the namespace as per your requirement.
using System;
using PX.Data;
namespace Testing
{
[Serializable]
[PXCacheName("AllergenTable")]
public class AllergenTable : IBqlTable
{
#region Allergen Name
[PXDBString(50, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Allergen Name")]
public virtual string AllergenName { get; set; }
public abstract class allergenName : PX.Data.BQL.BqlString.Field<allergenName> { }
#endregion
#region Description
[PXDBString(50, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Description")]
public virtual string Description { get; set; }
public abstract class description : PX.Data.BQL.BqlString.Field<description> { }
#endregion
#region Nature of Reaction
[PXDBString(IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Nature of Reaction")]
public virtual string NatureofReaction { get; set; }
public abstract class natureofReaction : PX.Data.BQL.BqlString.Field<natureofReaction> { }
#endregion
#region Severity
[PXDBString(10, IsFixed = true, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Severity")]
public virtual string Severity { get; set; }
public abstract class severity : PX.Data.BQL.BqlString.Field<severity> { }
#endregion
#region Symptoms
[PXDBString(IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Symptoms")]
public virtual string Symptoms { get; set; }
public abstract class symptoms : PX.Data.BQL.BqlString.Field<symptoms> { }
#endregion
#region Treatment
[PXDBString(IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Treatment")]
public virtual string Treatment { get; set; }
public abstract class treatment : PX.Data.BQL.BqlString.Field<treatment> { }
#endregion
#region Additional Info
[PXDBString(IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Additional Info")]
public virtual string AdditionalInfo { get; set; }
public abstract class additionalInfo : PX.Data.BQL.BqlString.Field<additionalInfo> { }
#endregion
}
}
Hope this may help you!
Thanks,
Moulali Shaik.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.