In the beforesumbit I see all the fields, I want t...
# suitescript
s
In the beforesumbit I see all the fields, I want to change the value of one field before it submit. I want to update the PostingPeriod field. How can I do it ?
a
have you tried setting the field value and it doesn't work?
s
I did not. I will ty it. IF it work, I will be ashame of me
a
a few things on posting period. 1. its driven by the trandate, so by default it will be the period that the trandate is in 2. its a list/record type, so you need the internal id to set it, you'll have to do a search/lookup to find the period internal id 3. if you can... avoid doing 2 by just setting the trandate so it falls in the right period, because 2 is kind of annoying
s
interesting. I greatly appreciate it
👍 1
n
You don't necessarily need to do a lookup. Getting the field and it's select options, can potentially be another approach depending on what you are trying to do. YMMV.