Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
In a Relationship Field, We want to Disable "Create Related Item" option. How can we do this?
or
Can we disable Create Related Item option in a Relationship Field?
Solved! Go to Solution.
Hi Rahul,
The feature to disable “Create Related Item” does not exist. I too was looking for this option and that’s when I stumbled upon the PTC RFC#131410 requesting this feature.
However I tried this workaround, hope you too might benefit from it. You can try customizing your viewset by Right Click/Context Menu. To modify the context menu, right click somewhere in the client to display the menu you wish to customize. (e.g., on an item for which you plan to disable the relationship option) When the context menu appears, on the bottom you should see a Customize this Menu option.
Choose this option and on the resulting dialog you will see all the current menu items. You can select Create Related Item and then delete the menu item by clicking on ‘-‘.
Hi Rahul,
The feature to disable “Create Related Item” does not exist. I too was looking for this option and that’s when I stumbled upon the PTC RFC#131410 requesting this feature.
However I tried this workaround, hope you too might benefit from it. You can try customizing your viewset by Right Click/Context Menu. To modify the context menu, right click somewhere in the client to display the menu you wish to customize. (e.g., on an item for which you plan to disable the relationship option) When the context menu appears, on the bottom you should see a Customize this Menu option.
Choose this option and on the resulting dialog you will see all the current menu items. You can select Create Related Item and then delete the menu item by clicking on ‘-‘.
Karthik is correct - there is currently no way to customize what buttons are shown in the relationship fields' side bar and RFC 131410 is the request to do this. Please open a case with PTC Technical Support and request to be attached to this RFC.
If your business needs to enforce that users cannot create related items in this way, I suggest implementing a trigger script to abort the transaction and inform the user that this is not allowed. The unfortunate aspect of this workaround is that it only informs the user once they hit Apply or OK to confirm their changes. There is a provided method called "abortScript()" within the siEnvironmentBean which can be used to accomplish this veto with message.
Just to follow up on this:
The KCS article for this is CS86897: The ability to customize what buttons are available for relationship fields in Integrity.
Regards,
Kael