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

Problem with app exchange product :Chatter Translate



I am trying to install Chatter Translate App exchange product.

In this I need to copy apex class which is provided by app exchage.

while copying this class I am getting the follwing error:


Error: Compile Error: No such relation 'FeedPost' on entity 'UserFeed'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. at line 25 column 24


Below is the class:


public with sharing class ChatterTranslateJsController extends BaseCustomActionJsController {
public override String actionId() {
return 'translate';

public override List<String> getActionHtmls(List<String> fiIds) {
Set<String> translatableFeedIds = new Set<String>();
for (UserFeed uf : [SELECT Id FROM UserFeed WHERE Type !='ContentPost' AND Id IN :fiIds LIMIT :fiIds.size()]) {
translatableFeedIds.add((uf.Id + '').substring(0,15));

List<String> labels = new List<String>();
for (String fiId : fiIds) {

labels.add(getActionLinkHtml(fiId, 'translate', ' ', ' - Translate'));

return labels;
public override void handleAction(String fiId, String parentId, String op, String param) {

userfeed ochat = [select id, body, InsertedById from userfeed where feedpost.feeditemid =: fiId];
user cuser = [select id,LanguageLocaleKey from user where id =: ochat.insertedbyid];
string slang = langpick.getlang(cuser.LanguageLocaleKey);
string tlang = langpick.getlang(userinfo.getlanguage());
List<CoreLanguage__c> cl = CoreLanguage__c.getall().values();
string key = cl[0].Google_API_Key__c;
string endpoint = cl[0].endpoint__c;
string desci = EncodingUtil.urlEncode(ochat.body, 'UTF-8');
string url = endpoint + '?key='+key+'&q='+ desci +'&source='+ slang +'&target='+ tlang;
changeActionHtml(fiId, getActionLinkHtml(fiId, 'translate', '', ' - Translating...refresh page to view'));




Please can any one guide me..


Thanks in advance,