Question

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

  • 3 February 2024
  • 0 replies
  • 49 views

Userlevel 1

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved