Skip to main content
Solved

Data Access Class for POLandedCostSplit


TimRodman
Pro I
Forum|alt.badge.img+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?

Best answer by Naveen Boga

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.

 

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

6 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • Answer
  • January 5, 2021

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.

 


TimRodman
Pro I
Forum|alt.badge.img+1
  • Author
  • Pro I
  • 146 replies
  • January 5, 2021

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


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • January 5, 2021

@TimRodman 

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


KishoK
Jr Varsity I
  • Jr Varsity I
  • 15 replies
  • January 5, 2021

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 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • January 5, 2021

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.

 


TimRodman
Pro I
Forum|alt.badge.img+1
  • Author
  • Pro I
  • 146 replies
  • January 5, 2021

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


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