is the current period stored in 'context' or somet...
# suitescript
s
is the current period stored in 'context' or something like that ?
c
Tim Dietrich's blog covers the topic of querying for current periods.
s
I agree but my issue is more than that. At the end of the month and the beginning of the month, we are uploading thousands of journal entries, really thousands and for some reason, too long to explain, I have to find the current period. So, in the before submit, i have to find the current period. By using SuiteQL, I will have to do thousands of database calls. I would prefer to look in the 'context' and get the period. hence my question, is period store anywhere (else than in the database)
a
n/cache is your friend
☝️ 3
s
Sounds an interesting solution. Let me think. I will look at the cache, If it's not there, I will find the period and save it in the cache. Great. Then they close the period. How will the cache refresh ?
I found it. postingperiod is in the context. I'm super happy
🙌 1