Solved

Data Access Class for POLandedCostSplit

  • 5 January 2021
  • 6 replies
  • 233 views

Userlevel 6
Badge +1

I can retrieve data from the POLandedCostSplit table in the database:

 

But I can’t find a Data Access Class that will allow me to retrieve the POLandedCostSplit data:

 

I need to retrieve the data using a Generic Inquiry and I’m trying to avoid having to create a SQL View.

Does anyone have any ideas?

icon

Best answer by Naveen Boga 5 January 2021, 08:01

View original

6 replies

Userlevel 6
Badge +1

Thank you @KishoK and @Naveen B for the ideas. I was trying to avoid a Customization Project, but I’ll look into using a PXProjection DAC.

Userlevel 7
Badge +17

Hi @TimRodman 

I concur with @KishoK. We can create a PXProjection to the “POLandedCostSplit” DAC and create a GI with Projection DAC.

This way we can get the required details.

 

Userlevel 2

Hi @TimRodman 
Since the DAC decorated with [PXHidden] attribute any class derived from it also will be hidden for 
Web api clients, instead of SQL view you can create a simple arbitary DAC class called PXProjection
with basic BQL select statement, you can create the class with any meaningful name (eg:ExposedPOLandedCostSplit) and copy paste all the properties from POLandedCostSplit to your newly created class, then add the BqlField = typeof(POLandedCostSplit. <property name>)] parameter inside the data type attributes of all properties you copied from original POLandedCostSplit



you can use the below code to decorate the new arbitary DAC (PXProjection DAC)
[PXProjection(typeof(Select<POLandedCostSplit,
            Where<PX.Objects.CS.int1, Equal<PX.Objects.CS.int1>>>), Persistent = false)] 
[Serializable]
This Projection DAC will act exactly same like SQL View but it’s the approved method by Acumatica 

Userlevel 7
Badge +17

@TimRodman 

oh okay. Could you please let us know that what is the info you want to get from POLandedCostSplit

Userlevel 6
Badge +1

Bummer, thanks for checking that. "POLandedCostDetail" doesn't have everything that I need unfortunately.

Userlevel 7
Badge +17

Hi @TimRodman,

This DAC is decorated with [PXHidden] attribute, hence we are NOT getting this DA in Generic Inquiry screen. Please find the screenshot for reference.

I think we may need to use “POLandedCostDetail” in GI and get the required results.

 

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