Can I not edit a record beforeLoad?
# suitescript
r
Can I not edit a record beforeLoad?
u
technically no
but what you can do is load the record, edit it, save it, and then redirect to it
it just slows down the UX if youre doing a lot of logic
r
no, not much
@battk good idea or great idea?
oh no, that's far too slow
u
yeah, like i said. If you have a lot of code running before load already or if it's not simple logic, it's not worth it but it's kind of the only way
what are you trying to do?
r
on aftersubmit i check for outbound message, want to record the date of the first one on a custom field
problem is, when you send a message it doesn't update. you'd have to edit the case and save
b
why is it so important to set the field in beforeLoad
its extremely unfriendly to do so
r
use case: user has case in their queue, assigned to them. they have no need to edit the case until it's solved. they can send a message without editing. the field will not update until they close the case.
or edit/save
u
so you want to change the field with out the user having to edit or save the case?
r
nevermind, it's fine. the reporting is for closed cases
no need for beforeload
u
sounds good!