1
require(['N/search','N/record'])

var search = require('N/search')
var record = require('N/record')
var invoice = record.load({
      type: record.Type.INVOICE,
      id: 444283
    })

log.debug('invoice',invoice)

Hi everyone can someone heelp me figure out how to properly load invoice records, vendor bills/credits ? i try this simple record.load with this enum type and i get errors of:

"name":"INVALID_TRANS_TYP","message":"Transaction type specified is incorrect.",

Ken Jeong
  • 21
  • 3

1 Answers1

1

That error would seem to indicate that the Transaction with Internal ID 444283 is not actually an Invoice. Verify your internal ID and transaction type match up.

erictgrubaugh
  • 8,519
  • 1
  • 20
  • 28