Skip to main content
Question

How to populate a selector with open financial periods and default to the current financial period?


Hello, Community. It took me some time to figure this out, but here is the solution:

 

using PX.Objects.GL.FinPeriods.TableDefinition;

public abstract class consumptionDateFilter : PX.Data.BQL.BqlString.Field<consumptionDateFilter> { }
[OpenPeriod]
[PXDefault(typeof(Search<FinPeriod.finPeriodID,
                    Where<FinPeriod.startDate, LessEqual<AccessInfo.businessDate.FromCurrent>,
                    And<FinPeriod.endDate, Greater<AccessInfo.businessDate.FromCurrent>>>>),
                    PersistingCheck = PXPersistingCheck.NullOrBlank)]

 [PXUIField(DisplayName = "Períod ID")]
 public virtual string ConsumptionDateFilter { get; set; }

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings