Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
How to load a Bill Credit record?
Hi,
What is the record type of a Bill Credit/Vendor Credit?
I tried using transaction,vendcredit..but I am getting an error saying invalid recordtype.
I am able to search the transaction using the following filter.
new nlobjSearchFilter('type',null,'anyof','VendCred',null);
But I am not able to load the Bill credit record.
Any help is appreciated.
var sumVCColumns = new Array(); sumVCColumns[0] = new nlobjSearchColumn('amount'); var sumVCFilters = new Array(); sumVCFilters[0] = new nlobjSearchFilter('mainline',null,'is','T',null); sumVCFilters[1] = new nlobjSearchFilter('custbody_select_job_for_costing', null, 'anyof', jobID, null); sumVCFilters[2] = new nlobjSearchFilter('type',null,'anyof','VendCred',null); var sumVCResults = nlapiSearchRecord('transaction', null, sumVCFilters, sumVCColumns); for (var i = 0; sumVCResults != null && i < sumVCResults.length ; i++) { //var vendorCredit = nlapiLoadRecord(sumVCResults[i].getRecordType(),sumVCResults[i].getId()); var vendorCredit = nlapiLoadRecord('vendcred',sumVCResults[i].getId()); 0