Anyone ever 'apply' a Customer Deposit via script ...
# suitescript
d
Anyone ever 'apply' a Customer Deposit via script before?
b
not like a customer payment. Look for a deposit application
d
Thanks @battk, I'm going to transform that deposit into a deposit application. However, the apply list is empty when I do that.
b
are there open invoices for that customer?
d
I see 2 available invoices in the UI
Both SS1.0 and SS2.0 records show NO 'apply' lines
b
generally this has a non zero apply for me
Copy code
require(['N/record'], function(record) {
var r = record.transform({fromType: 'customerdeposit', fromId: '35', toType: 'depositapplication'})
console.log(r.getLineCount('apply'))
})
d
Ya, me too. I've done it twice in 2 separate accounts and it works fine
I dunno what to say. Thanks though battk