I am trying to populate the dynamic material no based on this above report condition.
#region TransactionDate
[PXDate()]
[PXUIField(DisplayName = "Transaction Date")]
[PXUnboundDefault(typeof(Today))]
public virtual DateTime? TransactionDate { get; set; }
public abstract class transactionDate :
PX.Data.BQL.BqlDateTime.Field<transactionDate>
{ }
#endregion
#region Status
[PXString(1, IsFixed = true)]
[PXUIField(DisplayName = "Status")]
[PXDefault("H")]
[PXStringList(
new string[]
{
DocStatus.Hold,
DocStatus.Balanced
},
new string[]
{
"On Hold",
"Balanced"
})]
public virtual string Status { get; set; }
public abstract class status :
PX.Data.BQL.BqlString.Field<status>
{ }
#endregion
#region MaterialNo
[PXString]
[PXUIField(DisplayName = "Material Number")]
[PXSelector(typeof(Search<AMBatch.batNbr,
Where<AMBatch.docType, Equal<materialType>,
And<Where<AMBatch.status, Equal<Current<status>>,
Or<Current<status>, IsNull, And<Where<AMBatch.tranDate, Equal<Current<transactionDate>>, Or<Current<transactionDate>, IsNull>>>>>>>>),
typeof(AMBatch.batNbr))]
public virtual string MaterialNo { get; set; }
public abstract class materialNo :
PX.Data.BQL.BqlString.Field<materialNo>
{ }
#endregion
public const string MaterialType = "M";
public class materialType : PX.Data.BQL.BqlString.Constant<materialType>
{
public materialType() : base(MaterialType) { }
}
I have created the DAC but it seems when the values are empty all materials are not listed in the selector. Can anyone see what I am doing wrong over here.
Thanks