Hello, I’d like to update the values on a processing screens grid. Specifically the data on the ‘Create Transfer Orders’ processing screen, shown below.
The graph is SOCreate and I can see that the data is created using a view called FixedDemand.
hPXFilterable]
public PXFilteredProcessingJoin<SOFixedDemand, SOCreateFilter,
InnerJoin<InventoryItem, On<InventoryItem.inventoryID, Equal<SOFixedDemand.inventoryID>>,
LeftJoin<SOOrder, On<SOOrder.noteID, Equal<SOFixedDemand.refNoteID>>,
LeftJoin<SOLineSplit, On<SOLineSplit.planID, Equal<SOFixedDemand.planID>>,
LeftJoin<INItemClass,
On<InventoryItem.FK.ItemClass>>>>>,
Where2<Where<SOFixedDemand.inventoryID, Equal<Current<SOCreateFilter.inventoryID>>, Or<Current<SOCreateFilter.inventoryID>, IsNull>>,
And2<Where<SOFixedDemand.demandSiteID, Equal<Current<SOCreateFilter.siteID>>, Or<Current<SOCreateFilter.siteID>, IsNull>>,
And2<Where<SOFixedDemand.sourceSiteID, Equal<Current<SOCreateFilter.sourceSiteID>>, Or<Current<SOCreateFilter.sourceSiteID>, IsNull>>,
And2<Where<SOOrder.customerID, Equal<Current<SOCreateFilter.customerID>>, Or<Current<SOCreateFilter.customerID>, IsNull>>,
And2<Where<SOOrder.orderType, Equal<Current<SOCreateFilter.orderType>>, Or<Current<SOCreateFilter.orderType>, IsNull>>,
And2<Where<SOOrder.orderNbr, Equal<Current<SOCreateFilter.orderNbr>>, Or<Current<SOCreateFilter.orderNbr>, IsNull>>,
And<Where<INItemClass.itemClassCD, Like<Current<SOCreateFilter.itemClassCDWildcard>>, Or<Current<SOCreateFilter.itemClassCDWildcard>, IsNull>>>>>>>>>,
OrderBy<Asc<SOFixedDemand.inventoryID>>> FixedDemand;
I’m not sure of the best way to do this. Rather than change the BQL I was wondering whether it is possible to take the BQL result, then loop through the results, making the changes I require.
I was thinking I could extend the SOCreate graph and create a duplicate view called FixedDemand1, then in a view delegate for the original FixedDemand, I could update the results in FixedDemand1 return them.
public virtual IEnumerable FixedDemand()
{
foreach (SOFixedDemand item in FixedDemand1.Select())
{
item.fieldA = "SomeValue";
item.fieldB = -99;
result.Add(item);
}
return result;
}
This mostly works, I can update the data I need BUT I cannot get the Selected value to persist. So when the Process button is pressed, the selected rows are unselected and so no rows are processed. Any suggests, or alternative ideas welcome.