Solved

Data not displayed in customization


Userlevel 1

Hi All,

I tried to follow the instructions from https://community.acumatica.com/customizations-187/adding-a-new-column-to-a-grid-5268 in order to add column in the grid

But I'm data is not getting displayed, Maybe it was changed in an update?

Graph Extension:

public class TimeCardMaint_Extension : PXGraphExtension<TimeCardMaint>
  {
    #region Event Handlers

    protected virtual void EPTimeCardSummaryWithInfo_ProjectID_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e, PXFieldUpdated InvokeBaseHandler)
    {
      if(InvokeBaseHandler != null)
        InvokeBaseHandler(cache, e);
            var row = (EPTimeCardSummaryWithInfo)e.Row;

           if (row != null)
            {
                PMProject objPMProject = PXSelect<PMProject, Where<PMProject.contractID, Equal<Required<PMProject.contractID>>>>.Select(Base, row.ProjectID);

                if (objPMProject != null)
                { 
                    Customer obj = PXSelect<Customer, Where<Customer.bAccountID, Equal<Required<Customer.bAccountID>>>>.Select(Base, objPMProject.CustomerID);
                    if (obj != null)
                        row.GetExtension<EPTimeCardSummaryExt>().UsrCustomerName = obj.AcctName;
                }
            }
    }

    #endregion
  }

DAC Extension:

public class EPTimeCardSummaryExt : PXCacheExtension<EPTimeCardSummaryWithInfo>
    {       

        #region UsrCustomerName
        [PXDBString(50, IsUnicode = true)]
        [PXUIField(DisplayName = "Customer Name")]
        public string UsrCustomerName { get; set; }
        public abstract class usrCustomerName : PX.Data.BQL.BqlString.Field<usrCustomerName> { }
        #endregion

    }

icon

Best answer by Naveen Boga 7 March 2023, 18:23

View original

3 replies

Userlevel 7
Badge +17

HI @mice  I just verified the above code and it is working as expected, I did nothing changes to your code.

Please find the screenshot for reference.

 

 

Userlevel 1

@Naveen Boga, I used the same code but see i’m not getting the data.

 

 

Userlevel 7
Badge +17

@mice  Have debugged and been able to fetch the value of the Customer Name ?

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved