I’m upgrading to 2020.2. Why does this server side...
# suitecommerce
g
I’m upgrading to 2020.2. Why does this server side event now throw this error? line: cartComponent.on(‘beforeAddLine’, function beforeAddLine(lines) {…. error: “You cannot override property _cancelableEvents of component Cart”
e
I think you should use the Cart Front-end Component, since the docs for the Backend says that it is deprecated:
😭 1
message has been deleted
g
ok, that’s a big problem. I’ll take a look. Might have to edit the SCA source in that case.
e
the cart component in the front-end does not work for you? I think it has the same beforeAddLine event
g
I need to access a lot of complex stock checks and data for multi-location multi-sub situations. I also need to check a few things when an order is submitted. We have some of the same checks client side, but it’s limited what you can do from there. It really needs to be inside NetSuite to get access to the right data. So this is a big set back.
e
gotcha! yep, it is a big problem in that scenario
👍 1
g
Looks like it’s just moved:
Copy code
Application.on('before:LiveOrder:addLine', function (model, currentLine) {

    }
});
Thanks for the help though.
✔️ 1