Hello-
I have created a custom table and have then created a view under ProjectEntry ext graph. However, when I try to run a script to update the values- it will not, for the life of me, update the values- I’m perplexed- I’ve never had issues with base detail tables on the ProjectEntry graph.. but now that I have a custom table it is really not liking it. See below for view that I created and then the action that I call to update the value in the cache based on a static value (just for testing). I have simplified the code down a lot for testing and de-bugging purposes, but for all intents and purposes, the same logic applies.
View:
public PXSelect<BlyIconPMBudget> BlyIconPMBudgetView;
Action:
public PXAction<PX.Objects.PM.PMProject> UpdateBalances;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Update Balances")]
protected void updateBalances()
{
foreach (BlyIconPMBudget b in BlyIconPMBudgetView.Select())
{
b.GrossRevAct = 45;
BlyIconPMBudgetView.Cache.Update(b);
}
}
Secondly, I would like for this to execute whenever anyone enters the page because the balances might have changed since they last entered the screen.. I essentially want to mock the native project balances, but if I can’t get that, I’m ok with it being executed via a button.