This is a follow up to this one:
How do I make my default value for my second UOM selector appear in the selector on page load?
Here’s my DAC declaration. I also used the strategy in the referenced link to set the values for the selector dropdown on load.
I added this to try to get the default value to display...but it didn’t work:
[PXUIField(DisplayName = "jUOM", Visibility = PXUIVisibility.SelectorVisible)]
I also tried a few other things that didn’t work. Any thoughts on how to get a Default value to appear in the Selector at load?
This part of the below referenced DAC should load the default, I think, but it doesn’t work…
[PXDefault(typeof(Search<InventoryItem.salesUnit, Where<InventoryItem.inventoryID, Equal<Current<SOLine.inventoryID>>>>), PersistingCheck = PXPersistingCheck.Nothing)]
#region juOM
public abstract class juOM : PX.Data.BQL.BqlString.Field<juOM> { }
protected String _jUOM;
[INUnit(typeof(SOLine.inventoryID), DisplayName = "jUOM")]
[PXUIField(DisplayName = "jUOM", Visibility = PXUIVisibility.SelectorVisible)]
[PXDefault(typeof(Search<InventoryItem.salesUnit, Where<InventoryItem.inventoryID, Equal<Current<SOLine.inventoryID>>>>), PersistingCheck = PXPersistingCheck.Nothing)]
public virtual String jUOM
{
get
{
return this._jUOM;
}
set
{
this._jUOM = value;
}
#endregion
}
Best answer by Naveen Boga
View original