• Karol Krawczyk
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

Hi, does anyone knwo how to show asked questions to external users from topic detail page? 
Steps I followed : 
Go to the community home page --> Click "Ask Question" Button --> Select Topic Name under "Post To"  --> Submit by clicking "Ask" Button.

view for me:

User-added imageview for external (not logged users)

User-added imageThanks in advance!

Hello, 
I want to upload about 5000 images to Salesforce via Apex. I used this code but I hit the callout limit (getContent method is treated as callout):

List<ContentVersion> contentVersionList = new List<ContentVersion>();

for(Object singleImage: images) {
String imageURL = singleImage.imageURL;
PageReference pageRef = new PageReference(imageURL);
ContentVersion cv = new ContentVersion();
cv.VersionData = pageRef.getContent();
cv.Title = 'Image Name';
cv.PathOnClient = imageURL ;
cv.Origin = 'H';//Chatter
contentVersionList.add(cv);
}
insert contentVersionList;

I tried to get a blob from imageURL and assign it to ContentVersion.VersionData , but it does not work for me.
I did not find any other solution how to insert images to Salesforce.
Any idea will be appreciated.
Thanks!

Hi, does anyone knwo how to show asked questions to external users from topic detail page? 
Steps I followed : 
Go to the community home page --> Click "Ask Question" Button --> Select Topic Name under "Post To"  --> Submit by clicking "Ask" Button.

view for me:

User-added imageview for external (not logged users)

User-added imageThanks in advance!

Hello, 
I want to upload about 5000 images to Salesforce via Apex. I used this code but I hit the callout limit (getContent method is treated as callout):

List<ContentVersion> contentVersionList = new List<ContentVersion>();

for(Object singleImage: images) {
String imageURL = singleImage.imageURL;
PageReference pageRef = new PageReference(imageURL);
ContentVersion cv = new ContentVersion();
cv.VersionData = pageRef.getContent();
cv.Title = 'Image Name';
cv.PathOnClient = imageURL ;
cv.Origin = 'H';//Chatter
contentVersionList.add(cv);
}
insert contentVersionList;

I tried to get a blob from imageURL and assign it to ContentVersion.VersionData , but it does not work for me.
I did not find any other solution how to insert images to Salesforce.
Any idea will be appreciated.
Thanks!