Hi,
I don't think there is a way to get the view id in the plugin. What you can do, is inspect the query that is used for the RetrieveMultiple message, along with its Filters and Conditions.
If you need to know the view id, I would suggest to create a custom field in the entity. Then in the filters of your views, you can set this field to the view's name or id. In your plugin you would then look for this attribute in the query to find out the
view name or id. Then you would remove the attribute from the query, so that valid results are retrieved. From then on, you know the name of the view and you can act upon it as you wish.
I would personally avoid such an approach though, because it is a little bit complicated and messy.
Greetings,
Pavlos
Please mark this reply as an answer and vote it as helpful if it helps you find a resolution to your problem.
View my latest gallery contribution
here.
Visit my blog
here.