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
Surya KiranSurya Kiran 

Passing image as a parameter to an APEX custom Web service

Hi,

 

Currently I am working on Web services. I want to display specifc details of account record like Name, Phone, Fax, Description using APEX web services. Everthing is going cool.. but the problem is I have a custom field named as logo (data type=Rich Text Area). I want to display this field on client side when I am invoking the method..But when I am trying this it's not showing image unless I have logged in salesforce.com account. because the image url is like this

https://c.ap1.content.force.com/servlet/rtaImage?eid=0019000000NR7gE&feoid=00N90000004woLD&refid=0EM900000004YsG

 

how to display image on client side.

 

any suggestions !!!!!!!!!!!!!!!!!!!1

 

Thanks,

kiran

Best Answer chosen by Surya Kiran
BinayakBinayak

If we can try in this fashion : send the base 64 encoded version of the image(from salesforce) , capture it in the client side and with the help of js convert it back to image/png or whatever.

All Answers

BinayakBinayak

If we can try in this fashion : send the base 64 encoded version of the image(from salesforce) , capture it in the client side and with the help of js convert it back to image/png or whatever.

This was selected as the best answer
__sandra____sandra__

you can not use the url generated by the rich text field because it is a private url thant needs authentification

 

I suggest to store logo images in Documents (make sure the images are public) and use a formula on the account that displays the logo image, you can then send the url of the image with your web service.

 

Regards