Solved

How to create a "light" DAC from an existing one

  • 21 December 2022
  • 2 replies
  • 93 views

Userlevel 3
Badge

Hello,

To solve a performance issue, I need to get VendorID list from this query :

select distinct (VendorID)
from APPayment, APRegister
where
APPayment.doctype='PPM'
and status='N' -- Statut ouvert'
and APPayment.RefNbr = APRegister.RefNbr
and APPayment.DocType = APRegister.DocType

To comply Acumatica, I guess I have to use a DAC to do that. In a way, this DAC would we be a kind of reduced version of the APPayment DAC in which I just would need to embbed the following fields an not the other ones :
- DocType,
- VendorID,
- Status

Hence the title of this topic. Is it possible to do that in Acumatica ?

icon

Best answer by Dmitrii Naumov 21 December 2022, 16:09

View original

2 replies

Userlevel 7
Badge +5

It is possible, you can create a new DAC named APRegister in your own namespace and include only the fields that you need:

  • DocType
  • RefNbr (required since it’s a key field)
  • VendorID
  • Status

I don’t think you even need to join APPayment here since all the data you need is in APRegister.

 

We actually even have examples of such “Light” DACs. You can usually find them in PX.Objects.XX.Light namespace

Userlevel 3
Badge

Thank you Dmitrii ! I didn’t think to change namespaces. It will be very helpfull.

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