MarkJoel60
MarkJoel60

Reputation: 557

Acumatica - How to use Existing DACs that have no database fields

I need to check the current balance on a customer.

According to the Inspector, it is using DAC CustomerBalanceSummary CustomerBalanceSummary

This DAC has no datafields associate with it No Datafields

How can I get this DAC's values in an extension using BQL?

EDIT: Can I trigger the calculations via an API call and get the values from Cache?

Or, can I see how it comes up with its calculations? I want the Balance field that is seen in the Customer screen.

I see the ARBalances DAC, and can get it:

  ARBalances balance = PXSelectReadonly<ARBalances,
                    Where<ARBalances.customerID, Equal<Required<ARBalances.customerID>>>>
                    .Select(Base, currentCustomer.BAccountID);

However, I do not think ARBalances.CurrentBalance is the same value I see in CustomerBalanceSummary.

Is it?

Upvotes: 0

Views: 264

Answers (1)

Patrick Chen
Patrick Chen

Reputation: 1056

Unfortunately, you cannot. This value is calculated on the fly and is not stored in the database.

Upvotes: 1

Related Questions