Acumatica 属性字段未在所有页面上显示属性值

Acumatica 属性字段未在所有页面上显示属性值,acumatica,Acumatica,我有一个字段,显示一个名为“Coating”的项目的属性。我通过布局编辑器将此字段添加到我正在自定义的两个现有屏幕:Sales Price和Sales Price Worksheets页面。在“销售价格工作表”页面上,涂层显示良好: 但是,在“销售价格”页面上,它们不会: 我在布局编辑器中的两个页面自定义中都有完全相同的元素,包含在受尊重的网格中:InventoryItem\uuu\uu属性。检查元素的属性选项卡,它们都有相同的代码: protected string[] _Attribut

我有一个字段,显示一个名为“Coating”的项目的属性。我通过布局编辑器将此字段添加到我正在自定义的两个现有屏幕:Sales Price和Sales Price Worksheets页面。在“销售价格工作表”页面上,涂层显示良好:

但是,在“销售价格”页面上,它们不会:

我在布局编辑器中的两个页面自定义中都有完全相同的元素,包含在受尊重的网格中:InventoryItem\uuu\uu属性。检查元素的属性选项卡,它们都有相同的代码:

protected string[] _Attributes;

/// <summary>
/// Reserved for internal use.
/// Provides the values of attributes associated with the item.
/// For more information see the <see cref="CSAnswers"/> class.
/// </summary>
[CRAttributesField(typeof(InventoryItem.itemClassID))]
protectedstring[]\u属性;
/// 
///保留供内部使用。
///提供与项目关联的属性值。
///有关更多信息,请参见课程。
/// 
[CRAttributesField(typeof(InventoryItem.itemClassID))]
据我所知,一切都一模一样。我甚至检查了为两个页面的select语句发送的查询结果,它们正确地返回了相似的语句,以显示每个元素的涂层


关于为什么不起作用,有什么想法吗?

我假设该属性在Sales Price Worksheets(销售价格工作表)屏幕上按预期工作,这是因为在中发布了示例,并且没有为ARPriceWorksheetMaint声明委托。详细信息数据视图:

public class ARPriceWorksheetMaint : PXGraph<ARPriceWorksheetMaint, ARPriceWorksheet>
{
    ...
    [PXImport(typeof(ARPriceWorksheet))]
    public PXSelectJoin<ARPriceWorksheetDetail,
            LeftJoin<InventoryItem, On<InventoryItem.inventoryID, Equal<ARPriceWorksheetDetail.inventoryID>>>, Where<ARPriceWorksheetDetail.refNbr, Equal<Current<ARPriceWorksheet.refNbr>>>,
            OrderBy<Asc<ARPriceWorksheetDetail.priceType, Asc<ARPriceWorksheetDetail.priceCode, Asc<InventoryItem.inventoryCD, Asc<ARPriceWorksheetDetail.breakQty>>>>>> Details;
    ...
}
public类arpriceworksheetmait:PXGraph
{
...
[PXImport(类型(ARPriceWorksheet))]
公众参与详情;
...
}
但是,在Sales Price屏幕上,有一个records()委托仅返回ARSalesPrice DAC的实例,阻止属性从数据库获取其值:

public virtual IEnumerable records()
{
    ...
    foreach (PXResult<ARSalesPrice> res in QSelect(this, Records.View.BqlSelect, new object[] { filter.PriceType, filter.PriceType, filter.PriceType == PriceTypes.Customer ? priceCode : null, filter.PriceType == PriceTypes.CustomerPriceClass ? priceCode : null, priceCode, filter.InventoryID, filter.InventoryID, filter.EffectiveAsOfDate, filter.EffectiveAsOfDate, filter.EffectiveAsOfDate, filter.ItemClassID, filter.ItemClassID, filter.InventoryPriceClassID, filter.InventoryPriceClassID, filter.OwnerID, filter.OwnerID, filter.MyWorkGroup, filter.WorkGroupID, filter.WorkGroupID }))
    {
        ARSalesPrice price = res;
        yield return price;
    }
    ...
}
公共虚拟IEnumerable记录()
{
...
foreach(PXResult res in QSelect)(这是Records.View.BqlSelect,new object[]{filter.PriceType,filter.PriceType,filter.PriceType==PriceTypes.CustomerPriceClass?priceCode:null,priceCode,filter.InventoryID,filter.InventoryID,filter.EffectiveAsOfDate,filter.EffectiveAsOfDate,filter.EffectiveAsOfDate,filter.ItemClassID,filter.InventoryPriceClassID,filter.InventoryPriceClassID,filter.OwnerID,filter.OwnerID,filter.MyWorkGroup,filter.WorkGroupID,filter.WorkGroupID})
{
arsaleprice=res;
收益回报率;
}
...
}
为了在Sales Price屏幕上显示该属性,您应该修改Records数据视图并重写其委托以返回ARSalesPrice和InventoryItem DAC的实例:

public class ARSalesPriceMaintExt : PXGraphExtension<ARSalesPriceMaint>
{
    [PXFilterable]
    public PXSelectJoin<ARSalesPrice,
        LeftJoin<InventoryItem, On<InventoryItem.inventoryID, Equal<ARSalesPrice.inventoryID>>>,
        Where<InventoryItem.itemStatus, NotEqual<INItemStatus.inactive>,
        And<InventoryItem.itemStatus, NotEqual<INItemStatus.toDelete>,
        And2<Where<Required<ARSalesPriceFilter.priceType>, Equal<PriceTypes.allPrices>, Or<ARSalesPrice.priceType, Equal<Required<ARSalesPriceFilter.priceType>>>>,
        And2<Where<ARSalesPrice.customerID, Equal<Required<ARSalesPriceFilter.priceCode>>, Or<ARSalesPrice.custPriceClassID, Equal<Required<ARSalesPriceFilter.priceCode>>, Or<Required<ARSalesPriceFilter.priceCode>, IsNull>>>,
        And2<Where<ARSalesPrice.inventoryID, Equal<Required<ARSalesPriceFilter.inventoryID>>, Or<Required<ARSalesPriceFilter.inventoryID>, IsNull>>,
        And2<Where2<Where2<Where<ARSalesPrice.effectiveDate, LessEqual<Required<ARSalesPriceFilter.effectiveAsOfDate>>, Or<ARSalesPrice.effectiveDate, IsNull>>,
        And<Where<ARSalesPrice.expirationDate, GreaterEqual<Required<ARSalesPriceFilter.effectiveAsOfDate>>, Or<ARSalesPrice.expirationDate, IsNull>>>>,
        Or<Required<ARSalesPriceFilter.effectiveAsOfDate>, IsNull>>,
        And<Where2<Where<Required<ARSalesPriceFilter.itemClassID>, IsNull,
                Or<Required<ARSalesPriceFilter.itemClassID>, Equal<InventoryItem.itemClassID>>>,
            And2<Where<Required<ARSalesPriceFilter.inventoryPriceClassID>, IsNull,
                Or<Required<ARSalesPriceFilter.inventoryPriceClassID>, Equal<InventoryItem.priceClassID>>>,
            And2<Where<Required<ARSalesPriceFilter.ownerID>, IsNull,
                Or<Required<ARSalesPriceFilter.ownerID>, Equal<InventoryItem.priceManagerID>>>,
            And2<Where<Required<ARSalesPriceFilter.myWorkGroup>, Equal<False>,
                     Or<InventoryItem.priceWorkgroupID, InMember<CurrentValue<ARSalesPriceFilter.currentOwnerID>>>>,
            And<Where<Required<ARSalesPriceFilter.workGroupID>, IsNull,
                Or<Required<ARSalesPriceFilter.workGroupID>, Equal<InventoryItem.priceWorkgroupID>>>>>>>>>>>>>>>,
            OrderBy<Asc<ARSalesPrice.inventoryID,
                    Asc<ARSalesPrice.priceType,
                    Asc<ARSalesPrice.uOM, Asc<ARSalesPrice.breakQty, Asc<ARSalesPrice.effectiveDate>>>>>>> Records;


    public IEnumerable records()
    {
        var startRow = PXView.StartRow;
        int totalRows = 0;

        foreach (ARSalesPrice salesPrice in Base.Records.View.Select(PXView.Currents, PXView.Parameters, PXView.Searches, 
            PXView.SortColumns, PXView.Descendings, PXView.Filters, ref startRow, PXView.MaximumRows, ref totalRows))
        {
            var item = PXSelectorAttribute.Select<ARSalesPrice.inventoryID>(Records.Cache, salesPrice) as InventoryItem;
            var res = new PXResult<ARSalesPrice, InventoryItem>(salesPrice, item);
            yield return res;
        }
        PXView.StartRow = 0;
    }
}
public类ARSalesPriceMaintExt:pxGrapherExtension
{
[可过滤]
公共记录;
公共IEnumerable记录()
{
var startRow=PXView.startRow;
int totalRows=0;
foreach(ARSalesPrice salesPrice在Base.Records.View.Select(PXView.Currents,PXView.Parameters,PXView.search,
PXView.SortColumns、PXView.Downings、PXView.Filters、ref startRow、PXView.MaximumRows、ref totalRows)
{
var item=PXSelectorAttribute。选择(Records.Cache,salesPrice)作为InventoryItem;
var res=新的PXResult(销售价格,项目);
收益率;
}
PXView.StartRow=0;
}
}

我假设该属性在Sales Price Worksheets(销售价格工作表)屏幕上按预期工作,这是因为在中发布了示例,并且没有为ArpriceWorksheetMain声明委托。详细信息数据视图:

public class ARPriceWorksheetMaint : PXGraph<ARPriceWorksheetMaint, ARPriceWorksheet>
{
    ...
    [PXImport(typeof(ARPriceWorksheet))]
    public PXSelectJoin<ARPriceWorksheetDetail,
            LeftJoin<InventoryItem, On<InventoryItem.inventoryID, Equal<ARPriceWorksheetDetail.inventoryID>>>, Where<ARPriceWorksheetDetail.refNbr, Equal<Current<ARPriceWorksheet.refNbr>>>,
            OrderBy<Asc<ARPriceWorksheetDetail.priceType, Asc<ARPriceWorksheetDetail.priceCode, Asc<InventoryItem.inventoryCD, Asc<ARPriceWorksheetDetail.breakQty>>>>>> Details;
    ...
}
public类arpriceworksheetmait:PXGraph
{
...
[PXImport(类型(ARPriceWorksheet))]
公众参与详情;
...
}
但是,在Sales Price屏幕上,有一个records()委托仅返回ARSalesPrice DAC的实例,阻止属性从数据库获取其值:

public virtual IEnumerable records()
{
    ...
    foreach (PXResult<ARSalesPrice> res in QSelect(this, Records.View.BqlSelect, new object[] { filter.PriceType, filter.PriceType, filter.PriceType == PriceTypes.Customer ? priceCode : null, filter.PriceType == PriceTypes.CustomerPriceClass ? priceCode : null, priceCode, filter.InventoryID, filter.InventoryID, filter.EffectiveAsOfDate, filter.EffectiveAsOfDate, filter.EffectiveAsOfDate, filter.ItemClassID, filter.ItemClassID, filter.InventoryPriceClassID, filter.InventoryPriceClassID, filter.OwnerID, filter.OwnerID, filter.MyWorkGroup, filter.WorkGroupID, filter.WorkGroupID }))
    {
        ARSalesPrice price = res;
        yield return price;
    }
    ...
}
公共虚拟IEnumerable记录()
{
...
foreach(PXResult res in QSelect)(这是Records.View.BqlSelect,new object[]{filter.PriceType,filter.PriceType,filter.PriceType==PriceTypes.CustomerPriceClass?priceCode:null,priceCode,filter.InventoryID,filter.InventoryID,filter.EffectiveAsOfDate,filter.EffectiveAsOfDate,filter.EffectiveAsOfDate,filter.ItemClassID,filter.InventoryPriceClassID,filter.InventoryPriceClassID,filter.OwnerID,filter.OwnerID,filter.MyWorkGroup,filter.WorkGroupID,filter.WorkGroupID})
{
arsaleprice=res;
收益回报率;
}
...
}
为了在Sales Price屏幕上显示该属性,您应该修改Records数据视图并重写其委托以返回ARSalesPrice和InventoryItem DAC的实例:

public class ARSalesPriceMaintExt : PXGraphExtension<ARSalesPriceMaint>
{
    [PXFilterable]
    public PXSelectJoin<ARSalesPrice,
        LeftJoin<InventoryItem, On<InventoryItem.inventoryID, Equal<ARSalesPrice.inventoryID>>>,
        Where<InventoryItem.itemStatus, NotEqual<INItemStatus.inactive>,
        And<InventoryItem.itemStatus, NotEqual<INItemStatus.toDelete>,
        And2<Where<Required<ARSalesPriceFilter.priceType>, Equal<PriceTypes.allPrices>, Or<ARSalesPrice.priceType, Equal<Required<ARSalesPriceFilter.priceType>>>>,
        And2<Where<ARSalesPrice.customerID, Equal<Required<ARSalesPriceFilter.priceCode>>, Or<ARSalesPrice.custPriceClassID, Equal<Required<ARSalesPriceFilter.priceCode>>, Or<Required<ARSalesPriceFilter.priceCode>, IsNull>>>,
        And2<Where<ARSalesPrice.inventoryID, Equal<Required<ARSalesPriceFilter.inventoryID>>, Or<Required<ARSalesPriceFilter.inventoryID>, IsNull>>,
        And2<Where2<Where2<Where<ARSalesPrice.effectiveDate, LessEqual<Required<ARSalesPriceFilter.effectiveAsOfDate>>, Or<ARSalesPrice.effectiveDate, IsNull>>,
        And<Where<ARSalesPrice.expirationDate, GreaterEqual<Required<ARSalesPriceFilter.effectiveAsOfDate>>, Or<ARSalesPrice.expirationDate, IsNull>>>>,
        Or<Required<ARSalesPriceFilter.effectiveAsOfDate>, IsNull>>,
        And<Where2<Where<Required<ARSalesPriceFilter.itemClassID>, IsNull,
                Or<Required<ARSalesPriceFilter.itemClassID>, Equal<InventoryItem.itemClassID>>>,
            And2<Where<Required<ARSalesPriceFilter.inventoryPriceClassID>, IsNull,
                Or<Required<ARSalesPriceFilter.inventoryPriceClassID>, Equal<InventoryItem.priceClassID>>>,
            And2<Where<Required<ARSalesPriceFilter.ownerID>, IsNull,
                Or<Required<ARSalesPriceFilter.ownerID>, Equal<InventoryItem.priceManagerID>>>,
            And2<Where<Required<ARSalesPriceFilter.myWorkGroup>, Equal<False>,
                     Or<InventoryItem.priceWorkgroupID, InMember<CurrentValue<ARSalesPriceFilter.currentOwnerID>>>>,
            And<Where<Required<ARSalesPriceFilter.workGroupID>, IsNull,
                Or<Required<ARSalesPriceFilter.workGroupID>, Equal<InventoryItem.priceWorkgroupID>>>>>>>>>>>>>>>,
            OrderBy<Asc<ARSalesPrice.inventoryID,
                    Asc<ARSalesPrice.priceType,
                    Asc<ARSalesPrice.uOM, Asc<ARSalesPrice.breakQty, Asc<ARSalesPrice.effectiveDate>>>>>>> Records;


    public IEnumerable records()
    {
        var startRow = PXView.StartRow;
        int totalRows = 0;

        foreach (ARSalesPrice salesPrice in Base.Records.View.Select(PXView.Currents, PXView.Parameters, PXView.Searches, 
            PXView.SortColumns, PXView.Descendings, PXView.Filters, ref startRow, PXView.MaximumRows, ref totalRows))
        {
            var item = PXSelectorAttribute.Select<ARSalesPrice.inventoryID>(Records.Cache, salesPrice) as InventoryItem;
            var res = new PXResult<ARSalesPrice, InventoryItem>(salesPrice, item);
            yield return res;
        }
        PXView.StartRow = 0;
    }
}
public类ARSalesPriceMaintExt:pxGrapherExtension
{
[可过滤]
公共记录;
公共IEnumerable记录()
{
var startRow=PXView.startRow;
int totalRows=0;
foreach(ARSalesPrice salesPrice在Base.Records.View.Select(PXView.Currents,PXView.Parameters,PXView.search,
PXView.SortColumns、PXView.Downings、PXView.Filters、ref startRow、PXView.MaximumRows、ref totalRows)
{
var item=PXSelectorAttribute。选择(Records.Cache,salesPrice)作为InventoryItem;
var res=新的PXResult(销售价格,项目);
收益率;
}
PXView.StartRow=0;
}
}

此字段是否保存在数据库中?是的,它是从CSAnswers表中提取的。它是一个项属性。属性正在使用图形的缓存。如果缓存中没有CSAnswers属性的集合,则该属性将不起作用。尝试将
PXSelect
添加到属性不起作用的图形中,该属性似乎无法解决问题e、 我还检查了正在工作的页面,并且基本页面以及扩展没有
PXSelect
视图。此字段是否保存在数据库中?是的,它是b