Hello All, I am writing a script for Revenue Recog...
# suitescript
r
Hello All, I am writing a script for Revenue Recognition Events. I keep getting an error saying
Invalid Key or Ref
for transactionline. I am setting it to the Line Unique Key from a Sales Order.
b
im not familiar with the revenue recognition in general, but you can try creating the record in dynamic mode and then using Field.getSelectOptions(options) to see what the options look like in general
you can also try loading an existing record and getting the value of the transactionline to see if line unique key goes in there
r
I tried the second option and It looks like it is the line unique key as I can find it via saved search
b
first option will give you the valid options for the field
if there are none, then you either need to set another first first, or there are no options which are valid in your account
if there are some and it doesn't include your option, then the line you are trying to select probably is not valid for revenue recognition events
r
hmm okay ill try that
Looks like that API isn't suppported for revenue recognition events
s
RevRec related records are a bit wonky in NS
b
dynamic mode?
s
just looking at the records browser definition on that I'd suggest what @battk says about it requiring another field to be set first in dynamic mode.
r
hmm okay ill add that see if it works
So it looks like all I had to do was enable dynamic mode and the code works
😕