1

I need to get the system notes of a transaction from a button on the transaction record form.

I tried to create a saved search of type SYSTEM_NOTE, however, SuiteScript returns the following error when the record filter is used as follows:

filters: [{
    name: 'record',
    operator: search.Operator.ANYOF,
    values: ['2252668']
}]

Can anyone give me an idea of how I can get a certain record’s system notes from SuiteScript?

Thanks!

edamazzio
  • 38
  • 6
  • 1
    Instead of "SuiteScript doesn't like it" consider "SuiteScript returns the following error..." or "*this* happens but I was expecting *that*". – Krypton Jul 18 '22 at 14:40

1 Answers1

1

You will receive an error using the filter shown in your question, because 'record' is not a valid filter for a SYSTEM_NOTE saved search. You can use 'recordid' instead. Note you should also use the EQUALTO operator, not ANYOF.

filters: [{
    name: 'recordid',
    operator: search.Operator.EQUALTO,
    values: ['2252668']
}]
Krypton
  • 4,394
  • 2
  • 9
  • 13