function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mihir Mehta 11Mihir Mehta 11 

Apex trigger on Tag objects

Hello Co-Developers,

We are using private and public tags in Salesforce, but would like to share the private tags created by one specific user with another member in his team. I wasn't able to see a way to do that, so I went down the apex trigger route. I see triggers are not supported on TagObjects (like TagDefinition and ContactTag). Am I correct about this ? Is there a work-around ?

Please help.

Best,
Mihir
scottbcovertscottbcovert
Hi Mihir,

This is correct; you cannot create an Apex trigger on the TagDefinition or XTag objects. That said, you can create XTag records via Apex so maybe a workaround would be to create a simple VFPage for creating tags with an Apex controller that checks the running user and cross references with some group or custom setting that determines if his/her tags should be shared and if so with whom to create duplicate personal tags for those other users.
Mihir Mehta 11Mihir Mehta 11
Thanks Scott.

That is a nice idea. I think you mean inline VF page, as we would like to keep the impact of this seamless to the end user.