Cannot resolve symbol for FeedItem.ContentFileName and FeedItem.ContentData.
FeedItem fi = new FeedItem();
fi.type = 'ContentPost';
fi.ContentFileName = 'test.txt';
fi.Title = 'test.txt';
String contentFile = '123,25000.00,2014-01-01,2014-02-02\n124,26000.00,2014-01-02,2014-02-03\n';
fi.ContentData = Blob.valueOf(contentFile);
insert fi;
I have the above code in a test and WebStorm is highlighting ContentFileName and ContentData in red. Intellisense says: “Cannot resolve symbol”
I confirmed that these two fields are missing from FeedItem in my Offline Symbol Table.
But they do exist in the API: https://developer.salesforce.com/docs/atlas.en-us.sfFieldRef.meta/sfFieldRef/salesforce_field_reference_FeedItem.htm
I’m also not blocked from pushing the code and my tests pass. So this is a minor issue.
Why would these symbols be missing though?
IDE info:
WebStorm 2019.2
Build #WS-192.5728.87, built on July 22, 2019
Licensed to Randall Lutcavich / Randy Lutcavich
Subscription is active until January 24, 2020
Runtime version: 11.0.3+12-b304.10 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1948M
Cores: 12
Registry:
Non-Bundled Plugins: com.illuminatedcloud2.intellij
Comments (4)
-
reporter -
reporter - marked as major
-
reporter - changed status to resolved
These fields were actually removed from the API:
"In API version 36.0 and later, use FeedAttachment to attach one or more content items to a FeedItem. As a result of support for multiple attachments through FeedAttachment, all fields related to content attachments have been removed. These fields are: ContentData, ContentDescription, ContentFileName, ContentSize, and ContentType."
-
repo owner Just catching up now, Randy. Sorry for the delayed response. Glad you were able to figure it out, though.
- Log in to comment
This is actually blocking me. For some reason this error doesn’t prevent me from pushing changes to a test that already had the problem. But any new tests that try to use those symbols will fail to push on save.