0

I need to post in chatter and @ mention to a selective contacts list based on specific criteria that is selected by the logged in user, when creating a specific record. (for example, corporate wants to push out a promotion using chatter to a selected list of users, based on region, type among other factors).

I believe trigger would help, but unable to figure out how to get it to work.

1

You could create a trigger on the record and then call Chatter in Apex to make the post with @mentions. Here's an example from the API documentation.

You may also want to use the ConnectApiHelper class to reduce the amount of code you have to write to post the @mentions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.