Discussions
Script to populate invoice items
I write function which populate items to invoice on custom form 109.
When I adding new line item I have a problem.
I set all fields but field amount has bean cleaned by some script.
I suppose some ajax script triggers on item change and clean amount field.
What can I do with this?
My function.
function populateRecords() {
var entity = nlapiGetFieldValue('entity');
if (entity) {
var filters = new Array();
filters[0] = new nlobjSearchFilter( 'custrecord_cm_source', null, 'anyof', nlapiGetFieldValue('entity'));
var columns = new Array();
columns[0] = new nlobjSearchColumn( 'internalid' );
var searchresults = nlapiSearchRecord( 'customrecordcomm_rec', 'customsearch_current_payment', filters, columns);
if (searchresults != null) {
for (var h = 0; h<searchresults.length;h++) {