Hi, @larryly Acumatica will not allow us to provide the static text on the PXDefault hence, we need to use the BQL constants.
I have modified your DAC filed PXDefault code, it seems there are some wrong conditions added.
Please find the updated DAC filed code below.
BQL Constants Class
public class AZConstants
{
public class BUYGROUP : PX.Data.BQL.BqlString.Constant<BUYGROUP>
{
public BUYGROUP() : base("BUYGROUP") { }
}
}
DAC Field:
#region UsrBuyingGroup
[PXDBString(50, IsUnicode = true)]
[PXUIField(DisplayName = "Buying Group")]
[PXDefault(typeof(Search2<CSAnswers.value, LeftJoin<BAccount,
On<BAccount.noteID, Equal<CSAnswers.refNoteID>,
And<BAccount.bAccountID, Equal<Current<SOOrder.customerID>>>>>,
Where<CSAnswers.attributeID, Equal<AZConstants.BUYGROUP>>>))]
public virtual string UsrBuyingGroup { get; set; }
public abstract class usrBuyingGroup : PX.Data.BQL.BqlString.Field<usrBuyingGroup> { }
#endregion