Hi guys, I'm trying to do a record.transform... fr...
# suitescript
e
Hi guys, I'm trying to do a record.transform... from a Return Authorization to a Credit Memo... but I'm getting this error: "You must enter at least one line item for this transaction." ... So... How do I pass the items already in the Return Authorization, to the new Credit Memo?
e
Strange. I’m doing this same thing and don’t touch the line items on the credit memos. Are you transforming in standard or dynamic mode?
I’m using isDynamic=false so I wonder if the line items are copied automatically in that scenario.
e
Interesting, I'm using Dynamic = True
Let me check with False
Same error 😕
recordObject = record.transform({
fromType: 'returnauthorization', fromId: 11371139, toType: 'creditmemo', isDynamic: false, });
b
can you refund the return authorization in the ui?
e
Yep, no problem
b
what query parameters are in the url while refunding the return authorization
e
id=11371026&e=T&transform=rtnauth&memdoc=0
b
doesnt look like the same return authorization
e
No, I copied another one, just to look at the parameters
b
you want to try refunding the same return authorization as the one you are trying to do in script
e
Thanks @battk @eblackey it works with sDynamic: false