Anyone have any ideas why loading a record, settin...
# suitescript
a
Anyone have any ideas why loading a record, setting sublist value on it, and saving the record wouldn't work? I'm completely at a loss
j
@Azi Did you ever get a solution on this? I just created something today that's supposed to modify the project tasks sublists, and I'm having the same issue. Everything works, no errors, in standard not dynamic mode (so I believe no need to commit or anything), but the record comes out unchanged.
a
@James Morris Are you doing your changes server side or client side?
j
server side. It's a scheduled script.
a
@James Morris So I was having my issues client side, even though I needed it done server side, but I thought it was easier to test client side. Eventually I just tried it again server side and then it started working. Did you try it in the script debugger with a try catch? I don't know about regular scheduled scripts, but map/reduce scripts are notorious for failing silently.
respond with @Azi so I get a notification of your response
j
@Azi trying the try-catch now, seeing if it gets my anything
a
k
j
@Azi yeah got nothing from that, it seems that my setsublistvalue and save actions are not throwing any error, but yet the values aren't being updated
a
@James Morris 🤔 What happens if after updating the sublist but before the save event you log out the sublist values. Does that give show you it was changed? Also is this only a scripting issue, meaning if you do it in the UI does it work?
j
@Azi I think in standard mode, you have to then submit and reload the record to get the values out
It does seem to update correctly in the UI
a
I did it in standard mode without reloading the record. It won't save the changes but you can see them with getSublistValue
j
@Azi Okay, cool. I'll give that a try.
@Azi Ugh. It is returning the values I'm trying to enter when I use the getSublistValue. I'm not missing something right. In standard you should just have to 1: load record 2: set sublist values 3: save the record
a
@James Morris Do you nean setSublistValue?
j
@Azi Yep, sorry
@Azi Oh well, I logged a case. Maybe support will actually provide some value. Appreciate the help. I'll let you know what I find out.
a
Yeah. It should be returning what you entered. That means its setting correctly and the issue seems to be in the save (I think). I'm not sure why else it wouldn't be working. '
Good luck! I know how frustrating it can be!!