+ Start a Discussion
ArabindaArabinda 

Add Multiple Topic for a Chatter post through APEX

I am trying to add multiple Topic for a chatter post through APEX code. I am trying to give topics as comma separated value (Test1,Test2,Test3).

But when I check in chatter post its coming as a single topic . I cannot select only Test1 or Test2 or Test3 .When clicking the Topic its showing as a single string.

Please suggest some work around for this problem through APEX code.

Thanks
Arabinda
Vatsal KothariVatsal Kothari
Hi,
Can you share your code?
ArabindaArabinda
Hi Vatsal,
I got some solution for the above problem.Calling below code in a loop and pass all topic as parameter.

ConnectApi.Topics.assignTopicByName(communityId, feedItemId, paramTopic);

Please check the below link  but  still its not a best solution as I have to to run the code in a loop to add multiple times.

http://salesforce.stackexchange.com/questions/48295/add-multiple-topic-for-a-chatter-post-through-apex