0

I have a customization where I'm adding a Selector to a grid field that has a description field as follows:

[PXSelector(typeof(Search<EPEmployee.bAccountID,
                   Where<EPEmployee.status, Equal<SetupTypes.active>>>),
                   typeof(EPEmployee.acctCD),
                   typeof(EPEmployee.acctName),
                   SubstituteKey = typeof(EPEmployee.acctCD),
                   DescriptionField = typeof(EPEmployee.acctName))]

My problem is that the field has a description (in this case, 'Employee Name') field that is automatically added, but I can't find a way to change the display name of that field.

Since I have another field that uses the same employee lookup, they both have the same 'Employee Name' description field - so I have no way of knowing which description goes with which Selector field unless I choose a value and see the description show up in its associated 'Employee Name' field.

Is there a way to change the display name of that description field? I've tried CacheAttached and the RowSelected event with a PXUIFieldAttribute.SetDisplayName, but nothing seems to work.. seems that 'field_description' is an automatically added field that doesn't exist anywhere in the DAC to be able to change the display name.

pmfith
  • 831
  • 6
  • 24

1 Answers1

0

Per Acumatica support, the only way that this can be done is as follows:

The only way that seems to work is to have two different DACs that are projections on the EPEmployee DAC and use each in the separate selector attribute.

For instance:

[PXProjection(typeof(EPEmployee))]
 public class EPEmployeeTest : IBqlTable
 {
    #region BAccountID
    ...
    #endregion
    #region AcctCD
    ...
    #endregion

    public abstract class acctName : PX.Data.BQL.BqlString.Field<acctName> { }
    [PXDBString(60, IsUnicode = true, BqlField=typeof(EPEmployee.acctName))]
    [PXUIField(DisplayName = "Employee Name New Label", Enabled = false, Visibility = PXUIVisibility.SelectorVisible)]
    public override string AcctName{get; set;}

 }
pmfith
  • 831
  • 6
  • 24