We use a map/reduce script to process a file and c...
# suitescript
s
We use a map/reduce script to process a file and create transactions (cash sale, cash refund) called Finance Batch Process. We are getting an error when trying to create transactions in September with a trandate of August. name":"USER_ERROR","message":"The transaction date you specified is not within the date range of your accounting period." In accounting preferences, I have it set to disallow transaction date outside of the posting period. Prior to using a map/reduce we used a SS 1.0 restlet which would always set the post period based on the trandate. This is not happening in our map/reduce code. For example, If i created a cash sale today and give it a tran date of August 8th, 2019 the system automatically updates the period to Aug 2019. This is not happening in SS 2.0 like it did in the old SS 1.0 code. Any thought on that?
t
If you are creating the record dynamically you probably need to use the dynamic mode so that field values are sourced (e.g. posting period is set based on the trandate)
see the help center topic "SuiteScript 2.0 – Standard and Dynamic Modes"