I want to set up a field on the form using suitesc...
# suitescript
s
I want to set up a field on the form using suitescript. Can I do it with a user event ?
e
beforeLoad gets passed a reference to the current
Form
instance
s
Thanks. i'm sure you are right. I've been reading and I'm finding many example to add field but in my case the field is already there. I only want to set the value I found some answer saying using setValue is not allow on beforeLoad and instead I should use submitfields. I just want to know what you recommend
j
Should be able to do this in Client Script
e
You can read about the
setValue
restriction on the
beforeLoad
page I linked
💯 1
j
in edit mode
s
Thanks Jen. I think I will go with the client script. I spent too much time trying to use the before load.
Eric, you are right. I looked in more detail to beforeLoad and the setValue is there. I tried it and it worked. Thanks a lot
1
a
Please notice that creating fields on the fly is cool and everything, but: • They are no real fields and they may not be available on searches. • They could and probably will be attached and only exists in certain forms…
e
I don't think they're creating a field on the fly
👍 2