Nicholas Williams
11/08/2021, 7:57 PMvar custPayRec = record.create({
type: 'customerpayment',
isDynamic: true
});
custPayRec.setValue({
fieldId: 'customer',
value: customer,
});
//custPayRec.setValue({fieldId : 'account', value : 1});
custPayRec.setValue({fieldId : 'autoapply', value : false});
var lineCount = custPayRec.getLineCount({sublistId: 'apply'});
for (var i = 0; i < lineCount; i++) {
var invoiceLineId = custPayRec.getSublistValue({ sublistId: 'apply', fieldId: 'internalid', line: i}) * 1;
var invoiceLineAlt = custPayRec.getSublistValue({ sublistId: 'apply', fieldId: 'doc', line: i}) * 1;
var total = custPayRec.getSublistValue({ sublistId: 'apply', fieldId: 'total', line: i});
if (invoiceLineId == invoiceId * 1 || invoiceLineAlt == invoiceId * 1) {
custPayRec.selectLine({
sublistId: 'apply',
line: i
});
custPayRec.setCurrentSublistValue({
sublistId: 'apply',
fieldId: 'apply',
value: true
});
custPayRec.commitLine({
sublistId: 'apply'
});
}
}
custPayRec.setValue({fieldId : 'payment', value : total});
custPayRec.setValue({fieldId : 'creditcard', value : defaultCC});
customerPayment = custPayRec.save();
CD
11/08/2021, 8:00 PMNicholas Williams
11/08/2021, 8:00 PMbattk
11/08/2021, 8:08 PMNicholas Williams
11/08/2021, 8:49 PMNicholas Williams
11/08/2021, 8:49 PMehcanadian
11/08/2021, 8:50 PMccapproved
field to trueNicholas Williams
11/08/2021, 8:55 PMbattk
11/08/2021, 8:56 PMNicholas Williams
11/08/2021, 8:57 PMbattk
11/08/2021, 9:00 PMbattk
11/08/2021, 9:05 PMNicholas Williams
11/08/2021, 9:06 PMbattk
11/08/2021, 9:07 PMbattk
11/08/2021, 9:08 PMNicholas Williams
11/08/2021, 9:10 PMbattk
11/08/2021, 9:11 PMbattk
11/08/2021, 9:12 PMNicholas Williams
11/08/2021, 9:13 PMbattk
11/08/2021, 9:15 PMNicholas Williams
11/08/2021, 9:22 PMcustPayRec.setValue({fieldId : 'handlingmode', value: 'PROCESS'});
Nicholas Williams
11/08/2021, 9:22 PM