【问题标题】:Acumatica - Extended graph children not showing when viewAcumatica - 查看时未显示扩展图形子项
【发布时间】:2019-03-09 07:21:26
【问题描述】:

先生/女士,您好,

我有一个关于在 Acumatica 中扩展图表的问题。

我使用 2 个自定义视图(即 ReservationDetails 和 PropertyItems)扩展了 SalesOrderEntry 图表。一切运行良好,但当我尝试获取记录时,我的 PropertyItems 视图中的详细信息未填充。

扩展图表

public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
{

#region Selects

public PXSelect<RECOReservationDetail,
                    Where<RECOReservationDetail.reservationNbr,
                        Equal<Current<SOOrder.orderNbr>>>> ReservationDetails;


public PXSelectJoin<InventoryItem,
                    LeftJoin<RECOReservationDetail, On<InventoryItem.inventoryID,
                        Equal<RECOReservationDetail.inventoryID>,
                        And<RECOReservationDetail.reservationNbr,
                            Equal<Current<SOOrder.orderNbr>>>>>,
                    Where<InventoryItem.inventoryID, 
                        Equal<Current<RECOReservationDetail.inventoryID>>>> PropertyItems;

自定义表格 - ReservationDetail DAC

namespace RealEstate.DAC.CO
{
    [Serializable]
    public class RECOReservationDetail : IBqlTable
    {

        #region Reservation Nbr.

        [PXDBString(15, IsKey = true)]
        [PXUIField(DisplayName = "Reservation Nbr.")]
        [PXParent(typeof(Select<SOOrder, 
                            Where<SOOrder.orderNbr, 
                                Equal<Current<RECOReservationDetail.reservationNbr>>>>))]
        [PXDBDefault(typeof(SOOrder.orderNbr))]
        public virtual string ReservationNbr { get; set; }
        public abstract class reservationNbr : IBqlField { }

        #endregion

        #region Branch ID

        [PXDBInt]
        [PXSelector(typeof(Search<Branch.branchID>),
                    SubstituteKey = typeof(Branch.branchCD))]
        [PXUIField(DisplayName = "Branch ID", Required = true)]
        [PXDefault(typeof(AccessInfo.branchID), PersistingCheck = PXPersistingCheck.Nothing)]
        public virtual int? BranchID { get; set; }
        public abstract class branchID : IBqlField { }

        #endregion

        #region Inventory ID

        [StockItem]
        [PXUIField(DisplayName = "Inventory ID")]
        public virtual int? InventoryID { get; set; }
        public abstract class inventoryID : IBqlField { }

        #endregion

Page - Image

上图是我尝试从销售订单中获取订单时的视图。如您所知,它填充了文档详细信息部分,Features Group 除外。我已经将 CommitChanges = True 放在 Inventory ID 字段中,以便它填写功能部分的必要信息,但遗憾的是它没有填写任何数据。

<px:PXSegmentMask ID="edInventoryID" runat="server" CommitChanges="True" DataField="InventoryID"></px:PXSegmentMask>

我尝试调试它,但 PropertyItems 视图总是返回空值

非常感谢您的回复。

更新 - 2018 年 10 月 5 日

Full Page Link

Full Extended Graph Link

Full DAC Link

【问题讨论】:

  • 这是一个非常不典型的设计,它有助于拥有更完整的代码(完整的 DAC 和 ASPX 源代码)。
  • 您好@HB_ACUMATICA,我更新了我的问题并添加了整页、扩展图和 dac 链接。非常感谢您的回复和帮助。 :)
  • 在数据库中 RECOReservationDetail 表中有 CompanyID 字段吗?
  • 您似乎也重新实现了 SalesOrder 屏幕,而不是扩展它。不寻常。
  • 不幸的是,用您提供的部分文件复制您的示例太难了。

标签: graph acumatica


【解决方案1】:

我认为您的主要问题是因为您重新实现了销售订单屏幕而不是扩展它。这样做时,您删除了一些重要元素,例如文档详细信息“网格”。

如果我只是将您的 2 个数据视图添加到原始销售订单屏幕而不删除任何内容,它们看起来会更好地同步。请注意,它确实正确拾取了项目描述和项目图像(其他空白字段是因为我错过了您的自定义 DAC/表):

为了测试这一点,我扩展了原始销售订单,而不是创建一个作为原始销售订单副本的新屏幕。您可能删除了太多原始屏幕。

【讨论】:

  • 非常感谢!真正帮助我理解 acumatica 中的行为。 :D
猜你喜欢
  • 2019-03-04
  • 1970-01-01
  • 2022-12-30
  • 1970-01-01
  • 2018-05-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多