i can't access the record's id in beforeSubmit/bef...
# suitescript
m
i can't access the record's id in beforeSubmit/beforeLoad but I can in afterSubmit
c
If it is the brand new record, it is not yet saved to DB until after submit is triggered. That's why we will not have id in before Load/ submit. But if we open an existing record we will have it.
m
hey @Chandu - according to @battk it is still possible to obtain the record id via context in BeforeSubmit
b
Keep in mind i said you could get and modify the record in beforeSubmit. Not get the id.
m
Ah right. Thanks. That means we dont load the record - instead get a reference from the context which would be the oldRecord?
m
thanks for this - i seem to struggle to find relevant info in suite answers