Solved

Persisting PXProjection not saving multiple tables

  • 1 February 2024
  • 4 replies
  • 37 views

Userlevel 3
Badge +1

I am trying to make some changes to the TimeCardMaint screen. My goal is to join and load both the PMTimeActivity and CRActivity in one projection while being able to persist both.

However when I hit save PMTimeActivity is persisted while CRActivity is not, I get no errors so I am confused as what to do next. Can you please advise.

 

Attached is the projection EPTimecardDetail and below is the view in the DAC.

     

  [PXViewName("Time Card Detail")]
        public PXSelect<EPTimecardDetail,
            Where<PMTimeActivity.trackTime, Equal<True>>,
            OrderBy<Desc<EPTimecardDetail.date>>> Activities;

 

Also I have reviewed Understanding Acumatica's PXProjection Attribute | Acumatica Cloud ERP several times.

icon

Best answer by Leif 27 February 2024, 04:36

View original

4 replies

Userlevel 7
Badge +17

@Leif  Have you tried with Persistent property, which mentioned in the above link

 

 

Userlevel 3
Badge +1

I have, when reviewing the Projection class Persistent is set to true whenever you provide a persistent type list. In your example you must bc you did not provide the list, i do have the list.

 

Userlevel 3
Badge +1

The issue was that I needed to manually associate both records with via the NoteID and RefNoteID  fields.

Userlevel 7
Badge

Thank you for sharing your solution with the community @Leif!

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