Skip to main content
Answer

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

  • December 21, 2022
  • 2 replies
  • 158 views

Forum|alt.badge.img+1

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 ?

Best answer by Dmitrii Naumov

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

2 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • December 21, 2022

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


Forum|alt.badge.img+1
  • Author
  • Semi-Pro I
  • December 21, 2022

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