2

Some of my processes starts removing any chatter feed that I have related to an object. Everything was working fine on Winter'15 but today I tested on a Spring'15 (brand new org created today) and we are getting the error message:

common.exception.SfdcSqlException: Unable to find column 'parent.NAME' in result set metadata

This is my code, really simple.

Id myRecordId;
delete [select Id from myObject__Feed Where ParentId = :myRecordId];

Any idea?

2 Answers 2

2

I work at Salesforce and was helping to investigate your case. I found a workaround that you can apply. You'll be receiving a reply from your support representative shortly if you haven't already, but here's the general solution in case anyone else runs into it.

Instead of this line:

delete [select Id from myObject__Feed Where ParentId = :myRecordId];

Replace it with these lines:

myObject__Feed[] myObjectFeedItems = [select Id from myObject__Feed where ParentId =: myRecordId];
List<FeedItem> feedItems = new List<FeedItem>();
for (myObject__Feed myFeedItem : myObjectFeedItems) {
    FeedItem f = new FeedItem();
    f.id = myFeedItem.id;
    feedItems.add(f);
}
delete feedItems;

We're still investigating why the direct deletion doesn't work, but at least this will unblock you.

0
1

Agustina, perhaps the error is actually coming from a different part of your code? I just tried executing the exact two lines of code that you shared in your question, and the post in my org was deleted as expected. Here's a video showing the successful operation in my DE org: http://screencast.com/t/AFqDdm7nw48

If you used the Metadata API and a tool like the Force.com IDE to migrate code from your Winter '15 org to the Spring '15 org, perhaps the issue is related to the API version of your Apex class. In that case maybe you can try changing the API version to be 33.0 and back to the original API version.

1
  • Thanks Marty. Actually I tried also via Developer console and it's true, it works fine. I also tried changing API name to the class but no luck. Finally I raised a case as I don't find the error anywhere else. Let you know. Feb 12, 2015 at 7:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .