I'm having a heck of a time looking up examples, o...
# suitescript
m
I'm having a heck of a time looking up examples, or documentation around saving user notes using SuiteScript 2.x Ideally I'd like to be able to attach the note to a custom record. Any help is very much appreciated.
s
Why do you need to save the user notes in suitescript, they should save/attach automatically with the native Note UI
m
Well to give some background on this I have a custom record that in part tracks some customer data from multiple external sources, and when 'source a' says the data should be in NetSuite, but the information can't be found, I'm then using an automated process to make an api call out to 'source b' to try and get the data. However there is the edge case that exists where the data isn't in either of the 'source' systems so I'd like to enter a user note on the custom record to indicate that the information has been searched for, and we shouldn't add that record for subsequent searches.
it might be something that I need to track in just a custom field, but I thought user notes might be a good default feature to use for this.
s
So you are trying to create a User Note in code that isn't actually a "user" note. It's liek trying to just use the Note mechanism that exists
m
I guess I hadn't really given too much concern to the fact that this note would not be created by a "user", in this case my "user" is the system, yes. I was planning on using the Note Type 'System Logged Note' which I believe is a default that can be found in Setup > Sales > CRM Lists
... it looks like the reason my attempt was not working is due to the fact that I was trying to save the note as a 'System Logged Note', I've just updated my code to use the regular 'Note' type and it's working as anticipated. Still strange that there isn't too much documentation around this feature.