FDX Prior Quarter

Akalya_N
New Contributor

Hello Community, Is there any functions in Business Rule which is related to T#QuarterPrior1...?
I'm getting only this following function, 
Dim timeMemberIdPrQua As Integer = TimeDimHelper.GetLastPeriodInPriorQuarter(timeMemberId)

So can you please help me to get this...!

1 REPLY 1

NickKroppe
Contributor

Something like this should work. Just be sure to swap out the BRApis for APIs if in a finance rule or member formula.

Dim currentTimeId As Integer = BRApi.Finance.Time.GetIdFromName(si, "2024M9")
Dim currentQuarterId As Integer = BRApi.Finance.Time.ConvertIdToClosestIdUsingAnotherFrequency(si, currentTimeId, Frequency.Quarterly)
Dim priorQuarterID As Integer = BRApi.Finance.Time.GetPriorPeriod(si, currentQuarterId)
Dim priorQuarterName As String = BRApi.Finance.Time.GetNameFromId(si, priorQuarterId)