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
ScottB3ScottB3 

Invalid Identifier when using ConnectApi to add a comment to a case feed

I am trying to add a comment to a case feed using ConnectAPI.  
When I run this, I get the error

ConnectApi.ConnectApiException: Invalid identifier: 5003B000002o1FfQAI
Class.ConnectApi.ChatterFeeds.postCommentToFeedElement: line 674, column 1
 
Case salesforceCase;
createSFCase(salesforceCase);  //this works correctly and retrieving the Id gives me a value matching the system
ConnectApi.Comment comment = ConnectApi.ChatterFeeds.postCommentToFeedElement(null, salesforceCase.Id, 'comment text' );