• fxia@crunchtime
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I'm using VF Remoting to create a Chatter Content Post.

 

When I run a similar operation to create a Chatter Text Post, the operation runs just fine.

 

No exception is being returned, and the error seems to be in JS (Firebug Output):

 

e is undefined
[Break On This Error] this);e.on("exception",this.onProvider...n(e){return this.transactions[e.tid||  

The operation is successfully completed in Apex and everything operates normally, and the response from the server is accurate and complete. However, due to this error, my callback function no longer operates, so I can't continue as normal.

 

Updated: I've logged this with the Partner Support portal. Here is some more source code to give you an idea:

 

global with sharing class Controller{	
@RemoteAction global static public chatterFeedPost PostChatterContent(String taskId, String commentText, String fileBody, String fileName){ chatterFeedPost returnPost = new chatterFeedPost(); FeedPost post = new FeedPost(); post.ParentId = taskId; post.Body = commentText; if(fileName != '' && fileBody != ''){ post.ContentData = EncodingUtil.base64decode(fileBody); post.ContentFileName = fileName; } returnPost.user = [SELECT Id,SmallPhotoUrl,Name FROM User WHERE Id = :UserInfo.getUserId()]; returnPost.feedpost = post; insert post; return returnPost; } global class chatterFeedPost { public FeedPost feedpost {get;set;} public User user {get;set;} public String errorMessage {get;set;} }
}

 And the Javascript:

 

<apex:Page controller="Controller">
<script type="text/javascript>
var result = Controller.PostChatterContent('string:chatter-object-target_id', 'string:chatterposttext', 'string:base64encodedcontent', 'string:filename',function(event, result){
					if (result.status) { //... do something ... }
</script>					
</page>