How do I create payment against invoices ? There ...
# suitescript
r
How do I create payment against invoices ? There are 1716 invoices in drop down? I can't do findSublistLineWithValue, How will I find the invoice even with a internal ID with a drop down?
w
there should be a property on the "apply" sublist called "doc" that you can match the invoice internal id you want to apply the payment.
b
use the invoices or inv defaultValues
use them in the ui first via url parameters to see what they do
r
We can't set the default value for sublist , I tried with id payment, it gave me an error
b
what did the attempt look like
r
It worked with findsublistwithvalue
But I did get an error, it's lost somewhere tried two days ago
b
default values have a specific meaning in the context of transforming or creating records
follow the documentation trail of record.transform to learn about how they work
in this particular case, you may want record.create instead
in many cases, the default values match the query parameters supported by the ui
so you should pay attention to the urls used by netsuite in the ui while creating customer payments
my advice regarding the inv or invoices default values was manually adding them to the url to see how netsuite uses them