Hello. Can we create NetSuite native time entry re...
# suitescript
b
Hello. Can we create NetSuite native time entry record with SuiteScript please?
m
Yes. In SS2.0
Copy code
time_entry=record.create({type: "timebill"});
//save all the required fields with time_entry.setValue
time_entry.save();
b
Thank you @mtoniato Could I know the diff between Time and Timeentry please?
m
Netsuite likes using different names for the same objects Time, Time Entry, Time Bill: all the same stuff!! It depends where you look.
b
Thank you
n
They are different records check the records browser
b
Yes I checked there already and there are Time and Time Entry The issue is Time Entry is not supported by SS but Time (timebill) is
n
b
So I wanted to know if I can create time entry which is same as NetSuite native UI using SS
m
If for "Time Entry" you mean an actual time linked to a Task or a Case or an Event, that is timebill and the code I reported does exactly what you are asking for
I am reading on Record Browser: despite timebill and timeentry are separate items on the list, I think they are exactly the same. I created a lot of timebills in my last projects and they were indistinguishable from those created by UI
b
Thank you
n
the main difference is that the timebill record is used for billing and invoicing, while the timeentry record is used for tracking time entries within a timesheet.
👍 1
Further to that... The timebill record is used to record billable hours and invoice customers. It is available when the Time Tracking feature is enabled. The timeentry record is a subrecord of the timesheet record and is used to track time entries for a specific project or task. It is not used in the newest version of the timesheet record.