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
vinothvinoth 

Rich Text Area image in Visual force page and Data Loader

1.How to display the image which is in rich text area in visual force page. in user object i am having one custom field called signature, i need to display the current user image(signature) in visual force page? i am rendering the visual force page as a PDF.

 

2. How to upload the image to rich text field using data loader?

Abhay AroraAbhay Arora

Hi,

 

1.)You can just print the image using apex:outputfield value="{!your field name}"

 

2.)I dont think we can upload images using data loader

vinothvinoth

Hi Thanks,

 

i am populating user detail in other visual force page so i couldn't use outputField( if i use outputField, i am getting this error

 Error: Could not resolve the entity from <apex:outputField> value binding '{!$User.Signature__c}'. <apex:outputField> can only be used with SObject fields.

, so i have used "<apex:outputText value="{!$User.Signature__c}"  />" but its not showing any thing.

Abhay AroraAbhay Arora

This is becuase the inputFIeld and Text can only be used with sobject and $user is a global variable so you need to get this info using user object in your class and then use in your VF

 


    public user cuser{get;set;}

   

     get current user info in your constructor like this

    cuser=[select id,firstname,lastname,photo__c from user where id=:UserInfo.getUserId()];

 

     Now use the  rich text field in your page like

 

     <apex:outputField value="{!cuser.photo__c}" ></apex:outputField>