Questions tagged [connect-api]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Order Summary creation failed

On our project we have order creation for logged user and for guest. We would like to transform order to OrderSummary but it fails. In Apex we use ConnectApi.OrderSummaryCreation.createOrderSummary ...
2
votes
0answers
68 views

I receive an empty list of notifications using the Connect REST API endpoint: /connect/notifications

I want to get all the current user's notifications to display them in a LWC component. For this, I tried to make a REST API callout from Salesforce to the same Salesforce org using Connect REST API ...
0
votes
0answers
25 views

Connect API Sorting

We are using the connect API methods of ConnectApi.ChatterFeeds.getFeedElementsFromFeed ConnectApi.ChatterFeeds.getCommentsForFeedElement to display comments in a custom lightning component. Even with ...
2
votes
0answers
115 views

Can't run a test class on a class with ConnectApi.ManagedTopics as an Internal user OR as a Community user

I have an LWC which displays as a collapsible menu on an Experience Cloud Site. It's in a scratch org, and I'd like to deploy to production. The LWC is using a class that uses ConnectApi.ManagedTopics ...
3
votes
1answer
67 views

ConnectApi.ConnectApiException: Context user does not have permission to create rich text in feed

Trying to post richtext (a bolded piece of text) to a chatter feed via ConnectAPI using code below and get this error (user is System Admin) ConnectApi.ConnectApiException: Context user does not ...
0
votes
0answers
105 views

How to get ConnectApi ManagedContent by folder name in apex?

I can get cms ConnectApi.​ManagedContent​Version by topic, content id, content key, content type. But is it possible to get contents by folder name?
0
votes
1answer
117 views

Setup ConnectApi.FeedElementPage with message mentions for Test (setTestGetFeedElementsFromFeed)

I have a class that uses ConnectApi.ChatterFeeds.getFeedElementsFromFeed and from the result page I extract the mentioned users. This is working as intended but now I have to create a test for this ...
0
votes
0answers
66 views

Get unread Chatter Conversation (direct message) count for a Community User

I've been trying to determine how to get the number of unread DMs for a specific user in a Community, which I believe is a more specific count than this method: getUnreadCount(communityId) Get the ...
0
votes
2answers
557 views

Chatter Post and Tag user from Apex Trigger

I'm trying to do a chatter post and tag a user on a record from Apex Trigger. I tried the following approach,per https://blog.jeffdouglas.com/2013/10/03/chatter-for-apex-code-examples/ Id userId = ...
1
vote
1answer
465 views

How to create a test for the ManagedTopic?

I have an Apex class TopicController that has a method that returns a list of Navigational Managed Topics: public with sharing class TopicController { // Returns a list of all Navigational Managed ...
0
votes
1answer
112 views

how to query direct message object from the customer community plus profile?

I need to retrieve direct message data from the customer community plus user profile. How to query direct message object from the customer community plus profile? Thanks, Prasad
1
vote
1answer
818 views

Sending large Files to external system

From Salesforce, I am sending files to AWS Server. I am able to successfully achieve it if the file is under 3 to 4 MB. When I try with more than 6 to 7 MB, the file is getting reached to the AWS ...
2
votes
1answer
105 views

Does the url value for MarkupBeginSegmentInput matter?

Given a ConnectApi.MarkupBeginSegmentInput with a markupType of ConnectApi.MarkupType.HYPERLINK, the url attribute is required as stated in the documentation: https://developer.salesforce.com/docs/...
0
votes
1answer
515 views

How do I avoid error ConnectApi.ConnectApiException: Cannot provide both 'Poll' and 'QuestionAndAnswers' capability values at the same time

I am trying to set a question title for a poll chatter post created by apex using the following code CollaborationGroup g = [SELECT Id FROM CollaborationGroup WHERE Name='Edge Communications Customer ...
0
votes
1answer
174 views

Customer user cannot create chatter post on a community group

I have an issue when I try create a post from an apex class, the user is a customer community user and I create the post from a Lightning community ConnectApi.ChatterFeeds.postFeedElement(Network....
2
votes
0answers
138 views

Multiple Files on chatter Feed is not showing when created from apex

I see Chatter post can allow multiple files to be posted at a time in Lightning. But from the below code in Apex, I'm only able to get one file on the chatter post. List<ConnectApi.BatchInput> ...
0
votes
0answers
34 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 ...
0
votes
0answers
238 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
1answer
748 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
164 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 ...
2
votes
1answer
41 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
41 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
697 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....
1
vote
1answer
147 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
1k 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
1answer
466 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
118 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
473 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"...
0
votes
2answers
745 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 ...
0
votes
1answer
320 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
418 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
2k 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
41 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
226 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>(); ...
0
votes
1answer
1k 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 ...
1
vote
1answer
2k 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
1k 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
1k 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 ...
6
votes
2answers
5k 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
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 ...
0
votes
1answer
212 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
958 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
1answer
292 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
2k 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
1answer
101 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 ...
1
vote
0answers
160 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
865 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 ...
2
votes
1answer
312 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 ...
2
votes
1answer
1k 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 ...
3
votes
1answer
303 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: ...