Skip to main content
Solved

Data not displayed in customization


  • Freshman I
  • 6 replies

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

    }

Best answer by Naveen Boga

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.

 

 

View original
Did this topic help you find an answer to your question?

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3411 replies
  • Answer
  • March 7, 2023

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.

 

 


  • Author
  • Freshman I
  • 6 replies
  • March 14, 2023

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

 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3411 replies
  • March 14, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings