The internal ID on a deposit line on a Customer Re...
# suitescript
c
The internal ID on a deposit line on a Customer Refund does NOT match the internal ID of the Customer Deposit; I assumed it would. Has anyone seen this before? I appreciate it's a super obscure/very specific question. I'm creating customer refunds based on a search which provides me a list of customers and deposits. I'd like to make sure I'm applying the refund against the correct deposit. I can assume the deposit is at line 0, which will probably work, but that doesn't feel as safe as using record.findSublistWithValue() and passing in the ID of the deposit record to make sure I'm selecting the correct deposit line on the refund.
w
Tested it out. It points to a "Deposit Application" transaction in my case. The deposit application is connected to the customer deposit
c
How did you know which record the internal ID pointed to?
w
But that is after I have applied and saved the customer refund
That deposit application is created when I save the customer refund
c
I'm doing this before the refund is saved. It's in dynamic mode though so there's a chance that field is populated before I save.
but if it's after save then I can't get. Unless I split the script into two. One to create the refunds then one to apply
I'll look into this a little closer later today. Thanks for looking!
w
In dynamic mode in create, the "doc" in the "deposit" sublist shows the correct id of the "Customer Deposit"
c
I didn’t see that, will verify later, thanks!
That worked well. Not sure why the internal ID field wasn't working but the doc field has the required ID. Thanks!
Context: a staff member shared an internal discount code on a facebook group so now we have 700 customer deposits that we need to refund because the discount code was 50% 🙂
facepalm 1
s
early black friday deal!