Anyone know of a way to get the billing schedule a...
# suitescript
c
Anyone know of a way to get the billing schedule along with the recurrence? Netsuite doesn't provide a save search so I was looking into scripting, but I am having a hard time getting the field. This was my test search I have been running in the console. It works without recurrence, but once I add that it say it's not a column
Copy code
require(['N'], function(N) {
for(var n in N){window[n] = N[n];};
try{
    
var s=search.create({
   type: "billingschedule",
   filters:
   [
      ["internalid","is","1348"]
   ],
   columns:
   [
      search.createColumn({name: "name", label: "Name"}),
	  search.createColumn({name: "recurrence", label: "recurrence"}),
   ]
});
console.log(s.toJSON());
console.log(s.runPaged().count);
s.run().each(function(r){
   console.log(r.toJSON());
   return true;
});

} catch(e){console.error(e.message);}})
c
Have you tried building it out int he UI first? Thats a pretty good way to start if you're unsure of what fields are available. Then you can load that search in the console and take the filters/columns.
c
Sorry I should clarify. They don't let me add include the sublist style information. It's only header information.
I was able to load the record in the console using 1.0, but not 2.0 so that could be part of the problem
Copy code
nlapiLoadRecord('BILLINGSCHEDULE',1348)
This is what I see in the console so it seems like it should be right.
t
some records cannot be loaded using console. if you try server side e.g. script debugger you can see that you can load the billing schedule using SS 2.x