Acumatica 扩展CSDAC时,如何获取网格上属性值的控件类型?

Acumatica 扩展CSDAC时,如何获取网格上属性值的控件类型?,acumatica,Acumatica,我正在尝试使用其他功能在SmartPanel网格上显示属性ID和值。我能够在显示值时实现,但值为文本类型。我无法获得202500的属性选项卡(复选框、组合等)中的值的控件类型 我已经扩展了CSDAC以及AttributeID和Value字段 public PXSelectJoin<CSAnswers3, LeftJoin<CSAnswers,On<CSAnswers.attributeID, Equal<CSAnswers3.attributeID>>>

我正在尝试使用其他功能在SmartPanel网格上显示属性ID和值。我能够在显示值时实现,但值为文本类型。我无法获得202500的属性选项卡(复选框、组合等)中的值的控件类型

我已经扩展了CSDAC以及AttributeID和Value字段

public PXSelectJoin<CSAnswers3,
LeftJoin<CSAnswers,On<CSAnswers.attributeID,
Equal<CSAnswers3.attributeID>>>> DetailsView;


[Serializable]
[PXPossibleRowsList(typeof(CSAttribute.description), 
typeof(CSAnswers3.attributeID), typeof(CSAnswers3.value))]
public class CSAnswers3 : CSAnswers
{
    [PXDBString(10, InputMask = "", IsKey = true, IsUnicode = true)]
    [PXDefault]
    [PXUIField(DisplayName = "Attribute", Enabled = false)]
    [CSAttributeSelector]
    public override string AttributeID { get; set; }
    public new abstract class attributeID : IBqlField, IBqlOperand { }

    [PXDBString(255, IsUnicode = true)]        
    [PXUIField(DisplayName = "Value")]
    [CSAttributeValueValidation(typeof(CSAnswers3.attributeID))]
    [PXPersonalDataFieldAttribute.Value]
    public override string Value { get; set; }    


}

<px:PXSmartPanel runat="server" ID="AttributeInfo" Key="detailsView" 
LoadOnDemand="True" Caption="AttributeInfo">
<px:PXGrid runat="server" ID="CstPXGrid2" AutoAdjustColumns="True" 
DataSourceID="ds" MatrixMode="True" SkinID="Attributes">
<Levels>
<px:PXGridLevel DataMember="detailsView">
<Columns>
<px:PXGridColumn DataField="AttributeID" Width="120" />
<px:PXGridColumn DataField="Value" Width="280" /></Columns> 
</px:PXGridLevel></Levels></px:PXGrid>
<px:PXPanel runat="server" ID="CstPanel3">
<px:PXButton runat="server" ID="CstButton4" DialogResult="OK" 
Text="Close" /></px:PXPanel></px:PXSmartPanel></asp:Content>
public px选择join details视图;
[可序列化]
[PXPossibleRowsList(typeof(CSAttribute.description),
typeof(CSAnswers3.attributeID),typeof(CSAnswers3.value))]
公共类C答案3:C答案
{
[PXDBString(10,InputMask=”“,IsKey=true,IsUnicode=true)]
[默认值]
[PXUIField(DisplayName=“Attribute”,Enabled=false)]
[CSAttributeSelector]
公共重写字符串AttributeID{get;set;}
公共新抽象类attributeID:IBqlField,ibqlooman{}
[PXDBString(255,IsUnicode=true)]
[PXUIField(DisplayName=“Value”)]
[CSAttributeValueValidation(typeof(CSAnswers3.attributeID))]
[PXPersonalDataFieldAttribute.Value]
公共重写字符串值{get;set;}
}

我试图在网格上获取控件类型(复选框、组合等)的值,就像在股票项目屏幕的属性选项卡中一样。

Acumatica数据库中有一个表CSAttribute,它有列ControlType。在Sales demo数据库的示例中,您可以看到属性“SALESGOALY”的ControlType可以通过以下SQL发现:

select * from CSAttribute where AttributeID = 'SALESGOALY'
您可以使用以下BQL获取类型:

 PXSelect<CSAttribute, Where<CSAttribute.attributeID, Equal<Required<CSAttribute.attributeID>>>>.Select(Base, "SALESGOALY");
也就是说“SALESGOALY”的类型是1,或者是文本

[PXDBInt]
[PXDefault(1)]
[PXUIField(DisplayName = "Control Type", Visibility = PXUIVisibility.SelectorVisible)]
[PXIntList(new int[] {1, 2, 6, 4, 5}, new string[] {"Text", "Combo", "Multi Select Combo", "Checkbox", "Datetime"})]
public virtual int? ControlType
{
  get
  {
    return this._ControlType;
  }
  set
  {
    this._ControlType = value;
  }
}