<@U7A0KGURX>
# suitescript
w
@alien4u
you may have better luck in 1.0
w
Hmm
maybe I'll try that out; thanks
b
i dont even see
getCurrentSublistField
in your code
whatever the case it looks like that is a dynamic mode-only function
w
@Beau Correct, the error is being thrown somewhere within
Copy code
objRecord.save()
b
message has been deleted
oops my bad wrong screen
message has been deleted
w
That's a good point... I suppose the script thinks it's a dynamic record for some reason? 😑
b
have you tried setting
isDynamic
to true
would need to rename functions ur code to work with dynamic, ie, change
setSublistValue
to
setCurrentSublistValue
but yeah it’s weird it’s like it thinks its a dynamic record anyways
s
Why is your pageInit function not taking the context of the currentRecord? You should not load a record while accessing it in the currentRecord context...
Copy code
function setInventoryDetails(context){
var currentRecord = context.currentRecord;
}
w
@Sandii This script would be triggered by a button press; I was only using pageInit for testing. Subrecords can't be set on a dynamic record, which is why I use record.load. @Beau As I noted above, I need to load the record statically. Based on this: https://stackoverflow.com/a/44596350/12707271