How can I add line to the record system note or c...
# suitescript
a
How can I add line to the record system note or create system note?
p
What do you mean? They're read-only as far as a user/script is concerned. You add to them by modifying records. What is your actual requirement?
(See SuiteAnswer 92570, by the way)
a
@PNJ when someone modify the record I want to add extra customized line to the system Note
p
I guess one way of doing it would be to use another field on the record that you modify with your customised message in a beforeSubmit() UE
a
Well that'll be just old and new value
I want to set type and other fields as well
p
Like I said, you can't (for good reason). It's an audit log.
The way of writing to it is changing actual field values
s
you could create your own audit log custom record.
a
@stalbert how that will be added to the record I want
s
You'd need to have a user event script or something which would add an instance of the custom record each time a user edits the target record.
a
@PNJ @battk I've added a new hidden column field and in my script I load the record and set the value for that field, but there is no sign in system note, am I doing something wrong?
b
ive found that line item history tends to work out better for recording changes in value
so make sure that your hidden column starts out with a default value
and then change it later on
a
@battk I've set the default value, but still the same.
b
well, that should get you a system note on new transactions
your old ones are wrong
you can try loading and saving two different values across 2 different saves for your existing records