I have added a custom drop down field in Prepare Replenishment and it always return null and not holding the selected value
The following are the DAC Extension code
public class INReplenishmentFilterExt : PXCacheExtension<PX.Objects.IN.INReplenishmentFilter>
{
#region UsrMonthSelection
[PXString(1)]
[PXUIField(DisplayName="Months")]
[PXStringList(new[] { "1", "2", "3", "4", "5", "6" },
new[] { "One", "Two", "Three", "Four", "Five", "Six" })]
public virtual string UsrMonthSelection { get; set; }
public abstract class usrMonthSelection : IBqlField { }
#endregion
}
For some reason, it is not even triggering field updated event
Flowing are the field property set field
Update 1
protected void INReplenishmentFilter_UsrMonthSelection_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
var row = (INReplenishmentFilter)e.Row;
INReplenishmentFilterExt extn = cache.GetExtension<INReplenishmentFilterExt>(row);
string sOption = extn.UsrMonthSelection;
monthsel = Convert.ToInt32(sOption);
}
I have gone through the source code, INReplenishmentFilter table is declared with DB Columns, but there is not physical table in the database.
I have changed my extension field as DB Field and still, I am facing the same problem
Update 2
protected void INReplenishmentItem_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
if (InvokeBaseHandler != null)
InvokeBaseHandler(cache, e);
var row = (INReplenishmentItem)e.Row;
if (row == null) return;
INReplenishmentFilterExt extn = PXCache<INReplenishmentFilter>.GetExtension<INReplenishmentFilterExt>(Base.Filter.Current);
//extn.UsrMonthSelection - This value return null value customfield is selected after populating the replinishment grid.
/monthsel - This value always 0
monthsel = Convert.ToInt32(extn.UsrMonthSelection);
PXUIFieldAttribute.SetVisible<INReplenishmentExtn.usrSoQtyMonthOne>(cache, null, monthsel > 0);
PXUIFieldAttribute.SetVisible<INReplenishmentExtn.usrSoQtyMonthTwo>(cache, null, monthsel > 1);
PXUIFieldAttribute.SetVisible<INReplenishmentExtn.usrSoQtyMonthThree>(cache, null, monthsel > 2);
PXUIFieldAttribute.SetVisible<INReplenishmentExtn.usrSoQtyMonthFour>(cache, null, monthsel > 3);
PXUIFieldAttribute.SetVisible<INReplenishmentExtn.usrSoQtyMonthFive>(cache, null, monthsel > 4);
PXUIFieldAttribute.SetVisible<INReplenishmentExtn.usrSoQtyMonthSix>(cache, null, monthsel > 5);
}

