0

I find a lot of times I will have a dataview as such

PXSelectJoin<A, LeftJoin<B, ON<A.foreignKey, Equal<B.pk>>>, LeftJoin<C, ON<B.foreignKey, Equal<C.pk>>>> View;

And I will insert a row into the backing cache of the View:

View.Insert(new A()
    {
        ForeignKey = KeyThatExistsInTheDatabase
    }
)

And the row A will insert properly, but the Joined tables B and C will not show up in the UI, even though I have created the proper link in row A on the insert. The UI will only display the data from Table A and the rest of the fields from the joined tables will be null. That is however, until I press save / manually update that row in the UI, then magically the data appears.

I have tried:

View.Select();
View.View.RequestRefresh();

but neither of these fix my problem. Anyone reliably been able to bring in all joined tables when a row with a correct foreign key has been inserted?

Kyle Vanderstoep
  • 688
  • 4
  • 10

1 Answers1

0

You can get data records in one of two modes: merged or read-only. If you want to see the unsaved changes from the database, along with your modified records in the cache, you choose PXSelect<>

Keep in mind that the framework merges data records for only the main DAC of the data view.
This is the reason, you will not see the new record in the joined tables until the changes have been saved to the database (Perist or Save button).

A possible path to your goal, is to re-define your dataview as PXSelectReadonly. But in that case, you must implement your own record-manipulation techniques.

Hope this helps with the understanding.

Chris H
  • 705
  • 5
  • 11