Hi I have a requirement where I need to default the qty to produce to 1.00 in material wizard 1 screen which I have implemented as follows:
namespace PX.Objects.AM
{
public class MatlWizard1_Extension : PXGraphExtension<PX.Objects.AM.MatlWizard1>
{
#region Event Handlers
protected void AMProdItem_Selected_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e, PXFieldUpdated baseHandler)
{
baseHandler?.Invoke(cache, e);
var row = (AMProdItem)e.Row;
if (row.Selected == true) // Only if the item is selected
{
row.QtytoProd = 1.0000m;
}
}
This works but when I select a record to be sent to Material Wizard 2 screen this grabs the value based on original logic. How can I make sure the value is set to 1.00 across both screens?
As a side note I have also tried implementing field defaulting event handler but this universally updates AMProdItem.QtytoProduce which is not required because only these 2 screens need to be updated.
Thank you!