Add values to timesheet lines without committing the line

We have a script where we would like to fetch the project pricing from a custom record price list. So when a user is entering their time on the weekly timesheet page and selects a project in the sublist, the pricing should be fetched and update the rate column. The values does not display unless we also use commitLine. But we do not want to do that because it interrupts the user and they have to click their line again to finish up with a desciption, task and hours. But we still want them to be able to see the correct price when working on the line.

In the script we use setCurrentSublistValue to set the rate, and then commitLine to make the correct price appear. It works, but it annoys the user when they need to click the line they were working on again to complete it.

Is there any solution to make this work without having to commit the line first?

Rookie Asked on April 8, 2021 in SuiteScript.

Maybe should have mentioned that we do not just set rate, other fields that are set: item, isbillable, price, rate, overriderate, class.

We have tried to use commitLine and then selectLine again and it looks ok, but then the row cannot be saved after adding description and hours due to the service item. Even though an item is added and it is visible we get an error saying “Please enter values for: Service item”.

on April 8, 2021.

Can you add the rate upon validateLine or does the user need to see the rate before clicking okay?

on April 8, 2021.

Preferably they should see the rate before saving the line

on April 9, 2021.
Add Comment
1 Answer(s)

Whats the reason for seeing the price immediately? Why can this not be handled through on save or via a button? Also how many projects could there be on a weekly timesheet?

Rookie Answered on April 9, 2021.

If it is not possible to do it in a way where you can see the price before saving then there is not much to do about it.  It just looks better, so that is why they would prefer it if it is possible. There could be up to 15-20 projects per timesheet since  some users put in smaller time entries on support projects.

on April 14, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor