I'm writing a MR script. I have the internalid of ...
# suitescript
m
I'm writing a MR script. I have the internalid of a Customer deposit. I'd like to apply that customer deposit to an invoice via Suitescript but I'm kinda lost. Where can I start? Not looking for the entire answer just a starting point.
If it's a better idea to grab the invoice first, instead of the customer deposit and go from there I, can do that as well.
b
basics for all record stuff is to know how to do it in the ui
the way you do it in the ui will mirror how you do it in script
👍 1
z
First we shold clarify : applying customer deposit to invoice is real transaction not relationship! Start with exploring how to create, set values and... in CUSTOMER DEPOSIT application
a
And keep your sanity if you see the Invoice in the list in the UI, but you can't find it in the sublist with server-side scripts because it is a bug called intended behavior by NetSuite. Good luck.
b
if for some reason you cant find your transaction in a sublist due to sublist count limits or user filters
then you want to use default values to limit or choose which lines you want to use
a
@battk How will you go about using default values to choose the lines you want?
b
depends on the transaction
if he was doing a customer payment, then the useful default values are entity, inv or invoices, and deposits
with inv applying a specific transaction while invoices and deposits limit the transactions that appear on the matching sublist