A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [connect-api]

ConnectApi is the Apex namespace that includes Chatter in Apex functionality.

Filter by
Sorted by
Tagged with
0
votes
1answer
384 views

Can Chatter ConnectAPI be used to search chatter post feed only

Currently i am trying get chatter feed in visualforce page. I only want the feed which has a query string. But i want all the recent comments for the post. I couldn't find a visualforce tag to get the ...
0
votes
0answers
97 views

Custom Chatter Feed

Trying to build a lightning component or VF page wherein I can quickly see below views of chatters, is there something nearby already available on AppExchange or Github? List of all unread chatters (...
0
votes
0answers
17 views

Is it Possible to insert Files from VF Page using Connect APIs?

I know attachments can insert through connect API. What about Files ? I have heapsize issues while insert an document with size of 5 mb Here is My Controller to Insert a file @AuraEnabled public ...
2
votes
1answer
852 views

NoAccessException on ConnectApi.ChatterFeeds.updateFeedElement : line 706 column 1

Urgent Help Needed: I am getting exception while updating a chatter feed using ConnectApi.ChatterFeeds class. I am not getting it regularly but for some specific users under a particular custom ...
0
votes
1answer
102 views

Reaching Connect API's hourly request limit for this user and application?

I`ve got this type of error during the work in Lightning Community: You have reached the Connect API's hourly request limit for this user and application. Please try again later. My API Requests ...
0
votes
1answer
37 views

Chatter API vs ConnectAPI

I'm trying to understand the difference between Chatter REST Api and ConnectAPI in terms of capabilities. If my task is to post to a Chatter feed from an external application, I believe there would ...
0
votes
0answers
51 views

ConnectApi.UserProfiles.setPhoto doesn't update automatically the photo

When the user upload the photo, we don't have it available right after the upload, taking a very little time. The problem is, when the user upload the photo, the Lightning component receive the ...
2
votes
1answer
28 views

Can the new Chatter API Communities resource create a Visualforce Tabs community?

In Summer '19, we got access to a new POST method on the connect/communities endpoint, allowing for programmatic creation of a Community: Make a POST request to the existing /connect/communities ...
1
vote
0answers
24 views

Get ConventVersionId via Connect API

So I'm circling back on a problem I tackled a few years ago, as I needed to update the Chatter API version that I'm using, and in doing so need to rework some code that touched the nasty hack in ...
0
votes
1answer
121 views

Attachments in FeedItem After Insert Trigger

I'm trying to get the attachments from a FeedItem after insert trigger, but it does not return all the associated attachments. I understand attachments are inserted after the FeedItem is inserted (ref....
0
votes
0answers
45 views

Change FeedItemPost CreatedById using ConnectApi

I want to post chatter items via Apex with a link attached and an @ mention. I've been able to figure out how to attach the link and @ mention through research. The next step to finishing this is to ...
0
votes
0answers
22 views

External Data source with third application with salesforce Connect

I want to connect an external database with salesforce. I have seen examples: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_examples.htm So I have some ...
1
vote
1answer
1k views

ConnectApi.NotFoundException: Resource not found

I am getting an error when using the ConnectApi to post a feed: ConnectApi.NotFoundException: Resource not found. Class.ConnectApi.ChatterFeeds.getFeedElement: line 1502, column Class....
1
vote
1answer
48 views

How can I mark 'Best Answer' through ConnectApi?

How do I mark an answer as Best Answer through ConenctApi? I tried setting bestAnswerId of ConnectApi.QuestionAndAnswersCapabilityInput but it does not mark the answer as Best Answer. ConnectApi....
0
votes
1answer
185 views

ConnectApi.NotFoundException: Resource not found (ConnectApi.Communities)

I'm trying to get the community site url, using the ConnectApi in a lightning component, with a SystemAdmin it works fine, but not with any other profile. Here is my code final Network myNetwork = [...
0
votes
0answers
36 views

Group mention is not working with custom chatter functionality

I am using the Connect API to create a custom feed. This is working fine when I am using user in @mention but when I am using the group in @ mention it is not doing the feed post an exception is ...
0
votes
0answers
53 views

Not able to upvote/downvote from Community user

We have created a community of type customer service, in which we have customized chatter functionality with custom UI, using ConnectApi, while we are able to perform other operations, but we are not ...
0
votes
1answer
177 views

Connecting to metadata API in SOAP with token in PHP

I try to call retrieve in SOAP using PHP but I need to login before. For login, I have a token that I get from "https://test.salesforce.com/services/oauth2/token" So, I try to pass this token in the ...
0
votes
0answers
53 views

How to use customFilter in ConnectApi.ChatterFeeds.getFeedElementsFromFeed?

Does anyone know how to use custom Filter getFeedElementsFromFeed for case feeds in Salesforce? I use getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, ...
0
votes
0answers
54 views

Create Custom Chatter Feed

I was recently tasked with retrieving chatter feeds addressed to the context User {'To Me' feeds} and only those ('To Me' feeds) that were on Cases (standard Objects) that were 'Open' and getting to ...
2
votes
2answers
185 views

Platform events and Chatter Posts

I am subscribing to platform events in apex trigger. In the trigger I am trying to post to user's chatter feed using Chatter Connect API. I am aware that in this case the context is "Automated Process"...
3
votes
2answers
2k views

why need seeAllData = true in test class when use connectAPI

In my controller i'm using connectApi and my class functionality is working fine but the issue is when i'm using in my Test class (SeeAllData=true) it's covered 100% but seeAllData = true is not ...
0
votes
2answers
316 views

How to display Data in tabular format when Posting it to Chatter via Apex?

I have a requirement where I want to send email notification to User if Opportunity Close Date is last 10 days and send Chatter Feed notification when Opportunity Close Date is Last 3 days. For this ...
11
votes
2answers
13k views

How can I create a Chatter File via Apex?

From the Chatter tab I can go to 'Files' and then upload a file without attaching it to anything. I am wanting to know if there is a way to achieve the exact same thing via Apex?
0
votes
1answer
125 views

How to find the User Reputation Level

Is there a way to directly get the user reputation level using ConnectApi. Right now I am querying the user reputation points and then comparing the points with points required to achieve that level ...
0
votes
1answer
158 views

ConnectApi Bulkified class

In my org ConnectApi.FeedItem used in many places so I think we can have general class to make it work from different logics to avoid duplicate code. so for that i created a class and implement that ...
1
vote
2answers
656 views

How do I test that a ConnectApi.AnnouncementInput has been posted to a CollaborationGroup?

I have a trigger that posts a ConnectApi.AnnouncementInput, but how do I test that this has been posted, and to the correct chattergroup? I've created the test collaborationgroup in my test method, ...
1
vote
1answer
38 views

How can I use ConnectApi.ModerationCapability to automatically flag records containing bad words?

We have a requirement wherein chats/discussion(this is a custom object) having a bad words needs to be flagged in moderation to review. How can I use ConnectApi.ModerationCapability to automatically ...
1
vote
0answers
187 views

How can I create a meaningful test of a function which creates a Queueable which posts Announcements through the ConnectApi?

I have this method: public Id doPostAlerts(List<Product2> productList){ List<ConnectApi.AnnouncementInput> announcementInputList = new List<ConnectApi.AnnouncementInput>(); ...
1
vote
1answer
592 views

Create a Custom Chatter Stream from Apex ConnectApi

I love Chatter streams and how they allow me to combine and filter existing feeds. I would like to create such stream dynamically in Apex and found a ChatterFeeds.createStream(communityId, streamInput)...
0
votes
1answer
581 views

Connect to SharePoint from Apex using Files Connect API

I'm trying to create a Lightning component that lists the files in a SharePoint Folder. The opportunity has a custom field specifying which folder to list. I can see the files when I navigate to the ...
2
votes
1answer
323 views

Assigning a Topic when using postFeedElementBatch

I'm using the sample code from this part of the Developer's Guide to create Chatter Posts when certain conditions are met on a Case record. It all works well, but I'm not seeing any way that I can ...
0
votes
1answer
875 views

Files Connect: How to create SharePoint folder?

Business Use Case As accounts in Salesforce reach certain status then business wants new SharePoint folder to be created with same name and as users add files to that account then those files would ...
0
votes
0answers
16 views

Can anyone point me in the right direction if its possible to get object values form a .net website into salesforce

Can anyone point me in the right direction if its possible build a webservice to get object values form a .net website into salesforce. If there are articles which explain this topic and if it ...
3
votes
0answers
262 views

How can we update profile picture of user on onCreateUser()?

I use ConnectApi to modify picture of User in custom salesforce login (Facebook, Twitter...), as follows: global void updateUser(Id userId, Id portalId, Auth.UserData data){ ... ConnectApi....
0
votes
1answer
127 views

Only the first image is getting displayed Onload function

I have a custom visualforce page that mimics the functionality of a chatter group in Salesforce. For each post with an attachment, I am trying to show image icon as the attachment to download in the ...
0
votes
1answer
712 views

Chatter Post Link Lightning Experience Problems

I've been working on getting updates from a custom object to generate a chatter post that has a reference to the custom object on a case. I have been able to get what I want in classic experience as I ...
2
votes
4answers
967 views

creating Chatter FeedItem with sites user

is it possible to create a chatter FeedItem with a sites user with public access, is there any workaround to get this done? I tried to insert it with "insert" and also with the ConnectApi but I got ...
2
votes
2answers
5k views

How to dynamically creating chatter groups in Apex?

It looks like ConnectApi.ChatterGroup is abstract. Is there really no way to create Chatter groups via connect in Apex? Is the solution to call the chatter REST API from APEX? UPDATED based on ...
1
vote
1answer
208 views

Insert new ChatterMessage message object

I'm trying to create a Chatting app within one of my pages, I'm able to query for the ChatterMessage messages and such but I am unable to insert a new message. I realize there is the ConnectApi for ...
3
votes
1answer
1k views

Unit Testing ConnectApi.ChatterFeeds.getFeedElementBatch with auto-created feed posts

I have created a webservice APEX class that I need to write a Unit test for. The webservice assembles a custom filtered list of Chatter 'FeedElements'. All 'FeedElements' are system created, i.e. they ...
2
votes
0answers
168 views

Push Notification for Chatter Group not Working

I am using chatter group and implemented the Push Notification using ConnectApi.ChatterFeeds.postFeedElementBatch(Network.getNetworkId(), chatterPosts), but the push notification is not working. Now ...
2
votes
1answer
84 views

How to connect to ConnectApi in visual studio

I am in Visual Studio 2015 and I can connect to Salesforce using the Salesforce.Commmon, Salesforce.Force, and Salesforce.Chatter namespaces, but I can not use the ConnectApi namespace shown here, on ...
2
votes
1answer
613 views

Post chatter feed element from other chatter account [duplicate]

How can i use a different chatter account to post feed items. This is because I am posting feed elements from apex. But the user doesnt get notified when tagged himself(@mention) in feed. So i ...
1
vote
0answers
135 views

How to query/fetch public feed elements in a community to which the user is not subscribed?

Use Case Display a list of all public questions and posts to a community user, regardless of whether or not that user is subscribed to the groups or users who posted. What we've tried SOQL query ...
2
votes
1answer
262 views

ConnectApiHelperTest testMethod generating error for API version 35

Have been using the ConnectApiHelper from here https://github.com/forcedotcom/ConnectApiHelper Appears this test class starting failing when calling the testCreateInputFromBody() testmethod. It ...
0
votes
1answer
79 views

How to use ConnectApi in a VF page having readOnly=“true” attribute?

I've a VF page which have readOnly='true' attribute and I am trying to implement a button that when clicked will make a chatter post with some Blob content as element attachment using ConnectApi ...
1
vote
1answer
592 views

ConnectApi.ChatterFeeds Limit handling in trigger

I want my code to be reviewed and please point me the scenarios where it can cause exception. I have a trigger which modifies the chatter feed on Position__c object, trigger FeedItemBodyModify on ...
3
votes
1answer
209 views

Get the name of User who posted in a group in Connect API

I am creating a custom chatter page in Visualforce (kinda reinventing the wheel) by using Connect API. I am able to get the list of feeds for the user using the following connect API call: ...
2
votes
0answers
132 views

dashboard component snapshot via code

Is there a way to take snapshot of a dashboard component and get the url of the image, all via code? I tried to use ConnectApi.DashboardComponentSnapshot, but i get error saying i can't construct a ...