02-05-2024 09:51 AM - last edited on 02-05-2024 09:53 AM by JackLacava
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...!
02-05-2024 05:04 PM
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)