Restricting object relation selection list based on the calling object type. #19171
Replies: 4 comments
-
|
I would suggest to do the check in a preadd / preupdate event listener. |
Beta Was this translation helpful? Give feedback.
-
|
It would be better for the user, if the objects were already filtered by allowed values. Otherwise he would add the category, change some other values and then there would be an error quite late in the process. Additionally, it might be hard to guess, which objects might be allowed and which not, if this is a multiple category-field :-( So I would rather hope for another solution for filtering the list. |
Beta Was this translation helpful? Give feedback.
-
|
We have a similiar requirement which was easy to solve in AdminUI, but it is not in Studio UI (https://github.com/orgs/pimcore/discussions/19169). |
Beta Was this translation helpful? Give feedback.
-
|
Hi @SimonCremer, since I am no React-developer I let AI implement a frontend override, that adds some context about the current class to the request, when fetching the target relation object classes. and adding a custom webpack entrypoint. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
we have multiple object types, which behave to some extend the same.
Those are ProductTypeA and ProductTypeB.
Both contain a "many-to-one relation field" to CategoryType type.
CategoryType types can get quite a big number. But for the sake of example we have Category1, Category2, Category3.
Is there a way, that I can restrict the usage of CategoryTypeA in those ProductTypes, so that in objects of ProductTypeA all CategoryType objects are allowed and in ProductTypeB only Category1 and Category2 can be selected?
Thanks in advance
Markus
Beta Was this translation helpful? Give feedback.
All reactions