0
votes

Good Day Sir / Ma'am,

I have a question regarding extending graphs in Acumatica.

I have extended the SalesOrderEntry Graph with 2 custom views namely ReservationDetails and PropertyItems. Everything is running well except when I try to fetch a record, the details on my PropertyItems view are not populating.

EXTENDED GRAPH

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;

CUSTOM TABLE - 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

The above image is the view when I'm trying to fetch an order from sales order. As you can tell, It populates the document details part except for the Features Group. I already put CommitChanges = True on the Inventory ID field so that it will fill in the necessary information for the features part, but sadly it doesn't fill in any data.

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

I tried debugging it, but the PropertyItems view always returns null value.

Thank you so much for the replies.

UPDATE - 10/05/2018

Full Page Link

Full Extended Graph Link

Full DAC Link

1
That's a pretty atypical design, it would help to have more complete code (full DAC and the ASPX source code).Hugues Beauséjour
Hello @HB_ACUMATICA, I updated my question and added the full page, extended graph, and dac links. Thank you very much for the reply and the help. :)Linnaire
In the Database do you have a CompanyID field in the RECOReservationDetail table?Hugues Beauséjour
It also appears you re-implemented the SalesOrder screen instead of extending it. Not something usual.Hugues Beauséjour
Unfortunately as it is, it is too difficult to replicate your example with the partial files you provided.Hugues Beauséjour

1 Answers

0
votes

I think your main problem occurs because you re-implemented the Sales Order screen instead of extending it. While doing so you removed some important elements like the Document Details 'grid'.

If I just add your 2 Data Views to the original Sales Order screen without removing anything they appear to sync better. Notice it does pickup the Item description and item image properly (other blank fields is because I miss your custom DAC/Table): enter image description here

To test this I extended original Sales Order instead of creating a new screen that is a copy of the orginal Sales Order. You likely removed too much of the original screen.