Skip to main content

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
        nPXDBString(50, IsUnicode = true)]
         PXUIField(DisplayName = "Customer Name")]
        public string UsrCustomerName { get; set; }
        public abstract class usrCustomerName : PX.Data.BQL.BqlString.Field<usrCustomerName> { }
        #endregion

    }

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.

 

 


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

 

 


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


Reply