Contents tagged with PXProjection

  • How to use FBQL in PXProjection

    Hello everybody,

    Recnetly I had a need to create PXProjection and wanted to use in declaration of it not SelectJoin, but FBQL SelectFrom with combination of InnerJoin. Finally I've got something like this:

    [PXProjection(typeof(SelectFrom<SOOrder>.InnerJoin<SOLine>.On<SOOrder.orderType.

        IsEqual<SOLine.orderType>.And<SOOrder.orderNbr.IsEqual<SOLine.orderNbr>>>))]

    public class SalesOrderLines

    {

    }

    Nothing fancy, but during initial coding error messages were a bit confusing

    more

  • Property from CROpportunity is not loaded

    Hello everybody,

    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:

    [System.SerializableAttribute()]

    [PXCacheName(Messages.Opportunity)]

    [PXPrimaryGraph(typeof(OpportunityMaint))]

    [CREmailContactsView(typeof(Select2<Contact,

    LeftJoin<BAccount, On<BAccount.bAccountID, Equal<Contact.bAccountID>>>,

    Where2<Where<Optional<CROpportunity.bAccountID>, … more

  • PXPrpojection, Data Projection what is it?

    Hello everybody.

    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.

    Lets start)

    Steps:

    Think whats tables you … more