Skip to main content
Solved

Data Access Class for POLandedCostSplit

  • 5 January 2021
  • 6 replies
  • 248 views

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?

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.

 


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


@TimRodman 

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


Hi @TimRodman 
Since the DAC decorated with hPXHidden] 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)
            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 


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.

 


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.


Reply