Why does event.getCollection() not work within models?
Thanks
Why does event.getCollection() not work within models?
Thanks
Because it is not suppose to. A business object is not part of the framework and has no knowledge of the framework, and vice-versa.
The only way a business object could successfully run event.getCollection() would be if you passed event into the method as an argument, and that is NOT recommended to do. I’ll go one step farther: You SHOULD NOT do that.
If you need data from the request collection, then pass the request collection - or just the items you need - into the method as arguments.
HTH
I see, thanks.