Contents tagged with PXProjection
today I want to leave short note on issue with CROpportunity DAC class.
For quite a few times I've noticed that someone adds field to CROpportunity, but later notices that field is lost either on moment of loading from database, or lost during persisting record to database.
Reason for such weirdness is that starting from some Acumatica version CROpportunity got following declaration:
LeftJoin<BAccount, On<BAccount.bAccountID, Equal<Contact.bAccountID>>>,
Where2<Where<Optional<CROpportunity.bAccountID>, … more
Imagine that you need to have implementation of several tables with possibility to update them all.
Also you want to implement by the Acumatica side rather than by the database.
You know that Joined tables in Acumatica are read-only and you cannot update fields there
Can we create/use SQL-like views in Acumatica?
How can I join grouped (statistical) view to the DAC?
So, yes we can do it. For this purpose Acumatica gives you PXprojection attribute.
PXProjection attribute binds the DAC to an arbitrary data set. The attribute thus defines a named view, but is implemented by the server side rather than by the database.
Think whats tables you … more