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
Joseph Wildey 15Joseph Wildey 15 

Apex Test class for Interest Tags

We are trying to create a test class that uses Interest Tags, but don't know how to create an InterestTag record in the test.  I assumed that when you create a Topic with Interest Tags enabled, it would automatically create the Interest Tag record, but it doesn't.  When you try to create an Interest Tag manually, you get an error that TagName is now a writable field.  Any suggestions?  (I verified that the user doing the test has the Interest Tag and Financial Services Cloud Extensions permission sets.)
 
P.S.  I know I can make this work with SeeAllData=true, but that's not the preferred approach and I'm hoping someone has some idea.
SwethaSwetha (Salesforce Developers) 
HI Joseph,
I checked the documentation  https://developer.salesforce.com/docs/atlas.en-us.238.0.financial_services_cloud_admin_guide.meta/financial_services_cloud_admin_guide/fsc_interaction_summary_create_tag_categories.htm but couldn't find any details on the test class for Interest tags.

I'll circle back with more details on this.

Thank you
Joseph Wildey 15Joseph Wildey 15
Thank you.  I've looked through all of the release notes and couldn't find anything about creating Interest Tags in Apex or test classes.

You probably realized I had a typo in my post.  It should say that "TagName is not a writeable field".
SwethaSwetha (Salesforce Developers) 
I did understand that :) 
SwethaSwetha (Salesforce Developers) 
Interest tag is a virtual object built using the Topic object itself (but different from Topic).

I will coordinate with the concerned team to at least have this documented as a limitation here https://developer.salesforce.com/docs/atlas.en-us.financial_services_cloud_admin_guide.me[…]d_admin_guide/fsc_admin_considerations_interest_tags.htm if there is no way to perform apex testing on this.

I'll keep you posted. Is there a support case already logged for this ask?

Thank you
Swetha Maddali
Salesforce.com support