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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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