I am having this weird thing on resource allocatio...
# suitescript
t
I am having this weird thing on resource allocation record in restlet, I am loading an existing resource Allocation record. and updating the hours/percent of time. But it is giving me error, says you can't allocate more than 10400 hours, while I am doing 6 hours only. I tried that with browser console, the error is same. While it works while creating the resource allocation record.
b
t
"Note also that numberhours and percentoffime are read-only fields. They are returned when you load the record, but they cannot be modified."
Do you mean this? How do I update the values then
I am able to change the units via UI.
b
id expect that would be the reason you are getting errors related to changing the unit
t
allocationamount field works in console. let me check in restlet.
Yes, that works that solved another issue as well. I thought of going into specifics and working with numberhours and percentoftime would be better. But it was not, general allocation amount works fine.
Thanks a lot for your help, another thing I'll keep in mind is to check for the help center page of that record, before scripting on that. I will get the special cases just like I did now with your help.
@battk, over the years in development, have you developed any best practices guide or things to remember guide for yourself ?
b
i do not memorize that numberhours is read only on a resource allocation record
only that i should check scripted records first if something doesnt work
t
Ohh. that is nice.