Hey Everyone, we have an issue with transaction it...
# suitecommerce
d
Hey Everyone, we have an issue with transaction item option that is blocking the items from adding to cart. we created an item option(transaction column) that is of type date in webstore if we select a value and add it to cart we get an error "invalid field value" and this error occurs intermittently. Two questions 1. I see the date-format hardcoded in base theme templates is there a way to make the date format dynamic to align with Netsuite's date preference? 2. Why is the error occurring intermittently? I believe it is the issue with date-format seems very tricky a little bit of help please!
d
Ref. point 2, does it suddenly start happening across the board on the 13th of the month/with date values after the 13th?
d
@Dominic B we added the item option only recently and the dates I used for testing are 28/01/2021 and 31/01/2021 which are throwing errors and just tested for dates in Feb I didn't get any error
d
What happens testing with 12/02/2021 and 13/02/21?
d
@Dominic B worked for 12/02/2021 and threw an error with 13/02/21
d
The answer to 2 is clearly that you're pushing a DD/MM/YYYY date value into a MM/DD/YYYY field in that case. It'll work when the day is 12 or less.
d
@Dominic B but the Netsuite's date preference is DD/MM/YYYY and setting correctly in back-end. This is not customized I'm using out-of box only thoughts?
@Dominic B verified again on back-end seems like the issue is MM/DD/YYYY format thanks for the input! 🙂 any thoughts on how to align this with Netsuite's date preference? which is DD/MM/YYY
d
I'm far from the best person to answer this, as I've only just started to get to grips with SCA. If you're working with a clearly defined locale, you can probably use an extension to catch and reformat the data in the cart beforeAddLine event.
d
sounds like a plan 🙂 thank you! @Dominic B