• thematty
  • 30 Points
  • Member since 2013

  • Chatter
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 12

I want to span second <apex:outputPanel > to two colums .


<apex:pageBlock id="demoid" title="Demo Block"  >

             <apex:pageBlockSection columns="3" >

                     <apex:outputPanel > TextLine1 </apex:outputPanel >

                     <apex:outputPanel > abcd abcd abcd abcd abcd</apex:outputPanel >




currentyl its shown as below:



 TextLine1           abcd abcd abcd.    (EmptySpace)

                              abcd abcd           



I want as below :



 TextLine1          abcd abcd abcd abcd abcd             .












  • January 30, 2013
  • Like
  • 0

I have VF page render as PDF, with some CSS definitions (including Footer, Header).
Now I want to create similar page as Word.

Appriciate if someone can advise if, at all, I can controll the layout in word in same level I can in PDF?
And if so, what generally I should change from the original page (this as PDF)?
except to replace the renderAs="PDF" --> contentType="application/msWord", is modifying the CSS file will be enough?

This is hard to debug and has been posted a couple of times, but this one came back to me:


Insufficient Privileges


You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.



Now, I created a VF Page that uses a custom controler, which brings back details of a Candidate record in the Sample Recruiting application.


I'm logging is as user Clark Kentman, a standard platform user. Clark has only R permissions on the Candidate object.


If I understand it well, from a VF page with custome controller CRUD object and fied level permissions should be ignored as Apex class runs in system mode. My custom controler is defined without sharing as well. So shouldn't I see any Candidate Object under those circumstances regardless of record sharing?


In the security for the page, I have added the profile (standard platform user) and then in that profile itself I have enabled both controller class and VF page.


(For some reason, logged on as Clark I never see any page enabled in standard user profile, I do see the classes; logged on as admin I can see the pages added in standard user profile. Is this due to another permission?)





  • July 01, 2013
  • Like
  • 0

Hi All,


Is it safe to hardcode document url within <apex:image> tag in visualforce email template for embedding image as recommended in salesforce documentation

Link Here





I have a checkbox on a VF page that when checked sets a controller value to TRUE.


It rerenders and outputpanel with an apex:inputfield inside that displays a value say 12345.


The action on the checkbox causes the controller to set the value of the field in the controller (the same field that in in the inputfield) to say 4567.


Saving the record at this point save the correct value 4567 in the record.


HOWEVER, if I uncheck the checkbox, the outputpanel is again shown (rendered is based on the controller variable for the checkbox), BUT the value in the inputfield is the original value. 


If I save at this point the value saved is 12345.


Example code would be



public class simpletest{

public account a {get;set;}
public boolean isselected {get;set;}

    public simpletest(apexpages.standardcontroller con){
        a = (account)con.getRecord();
        a.BillingPostalCode = '12345';

    public void changevalue(){
            a.billingpostalcode = '99999';



<apex:page standardcontroller="Account" extensions="simpletest">
<apex:form >
  <apex:inputCheckbox value="{!isselected}" >
  <apex:actionSupport event="onchange" action="{!changeValue}" rerender="opp"/>

<apex:outputPanel id="opp" layout="block">
<apex:pageblock id="thepgblk" rendered="{!!isSelected}">
<apex:pageblockSection >
<apex:inputfield value="{!a.billingPostalCode}"/>
<apex:commandButton value="Save" action="{!save}" rerender="nothing"/>




anyone have any ideas as to why when the outputpanel is shown again it is not updated with the current value but infact reset the value to what was originally there?


Steps to reproduce:


1. Open VF page with know account id as ID parameter

2. Check the check box

   - The outputpanel dissapears and the controller sets the zip to 99999

3. Click save

4. Note on the account the billing zip is 99999


Not open the page again


1. Check the check box (we proved that is set the zip to 9999 above

2. Now uncheck the checkbox

3. NOTE the input field has 12345 in it

4. Click save

5. Note the Zip is now 12345

   - No where in the controller did it set the value back.

  - It appears when the outputpanel is rendered again only the setters fire and the getters do not. (Is this expected)

Close is enough to stop my code.

I need help with my Apex code, I am building a list to display to the customer using the only way I know how. 
Creating a list of high level data then building the child records within each node; this is working fine with a lesser number of records.


    public class API_DocumentRqAndRs {
        public API_Document__c apiDoc{get; set;}
        public List<Rq_Argument_Description__c> rqArgList{get; set;}
        public List<Rs_Argument_Description__c> rsArgList{get; set;}

    public List<API_DocumentRqAndRs> getApiDocumentListRqAndRs(){
        List<API_DocumentRqAndRs> apiDocRqRsList = new List<API_DocumentRqAndRs>() ;
// Build master list using this list List<API_Document__c> apiList = getApiDocumentList(); API_DocumentRqAndRs apiDocRqRs; for(API_Document__c apiDoc : apiList) { apiDocRqRs = new API_DocumentReqAndResp(); apiDocRqRs.apiDoc = apiDoc;
// Sets the key to query on fApiController.setapiDocId(apiDoc.id);
// This returns a query apiDocRqRs.rqArgList = fApiController.getRqArg();
// This returns a query apiDocRqRs.rsArgList = fApiController.getRsArg(); apiDocRqRsList.add(apiDocReqResp); } return apiDocRqRsList; }



Is there a way to increase my number of queries?   I have put much time into getting to this point and need it to work without a major rewrite.  Unless someone has a good solution?


Please help!  Thanks.




Hi All,

      I have this apex:button on visualforce page that I want to render ob the basis of outcome of two conditions .

render =A AND (Not (B)).

A condtion is = {!Opportunity.Checkbox==False}

B condtion is="{!$ObjectType.Opportunity.updateable}"

rendered="{(!Opportunity.Checkbox==False) && !(!$ObjectType.Opportunity.updateable)}" is not working as expected

i AM UNABLE TO GET THE RIGHT SYNTAX HERE, can anyone please help me!!!!

I want to span second <apex:outputPanel > to two colums .


<apex:pageBlock id="demoid" title="Demo Block"  >

             <apex:pageBlockSection columns="3" >

                     <apex:outputPanel > TextLine1 </apex:outputPanel >

                     <apex:outputPanel > abcd abcd abcd abcd abcd</apex:outputPanel >




currentyl its shown as below:



 TextLine1           abcd abcd abcd.    (EmptySpace)

                              abcd abcd           



I want as below :



 TextLine1          abcd abcd abcd abcd abcd             .












  • January 30, 2013
  • Like
  • 0



 how can i remove the bottom footer in visual force page like:-


                              Copyright © 2000-2013 salesforce.com, inc. All rights reserved. | Privacy Statement | Security Statement | Terms of Use | 508 Compliance           


is there any code to remove that


Hi all,

visualforce supports formatting an outputtext (date, currency, etc) using java messaging based formatter option, eg:

<apex:outputText value=", {0,date,M/d/yyyy h:mm a}">
     <apex:param value="{!Account.CreatedDate}"></apex:param>


However this only works for the US locale. This is a major flaw for companies trying to develop visualforce outside of US.

I know outputField will display in the user locale, however this will not allow custom formatting. IMO we are left with a incomplete solution here.


Eg. if i try to display just the time part of a local time (in GMT+1 timezone) on a visualforce page, i have to use Apex to achieve this.

The same is the case when i want to use a different decimal separator on numbers.


An idea to fix this is already posted here: https://sites.secure.force.com/success/ideaView?id=08730000000g62yAAA


I would be very interested if anyone created a generic workaround for this.






I have a inline visualforce page on an object detail page.


I want to have a Button on the object detail page  which will dowload this page.

Anybody know how to do this?


  • January 28, 2013
  • Like
  • 0

hello group,


        i have 2 obj enquiry and course i developed 2 pages for both enquiry and course . In enquiry page  i want to have picklist field  'select course',

        but iam not able to execute perfectly.........

         pls go through my below code and  resolve my  prblm


      <apex:outputLabel style="font-weight:Bold" value="Select a course :" />
     <apex:SelectList size="1" value="{!lst}">
     <apex:selectOptions value="{!items}"/>


    public List<Course__c> lst{get;set;}

    public Course__C getlst() {
      if (lst == null) {
        lst = [select Name from Course__c];
        return lst;

    public List<SelectOption> getItems(){
        List<SelectOption> options = new List<SelectOption>();
        for(Integer i=0; i < lst.size(); i++){
            options.add(new SelectOption(lst[i].Name,lst[i].Name));
        return options;


  iam getting an error that 'un expected token ' at line 'public List<SelectOption> getItems(){'



note: i dont have a field picklist in my enquiry obj... but i wanrt to display it in vf page is this possible to do



       pls help me ............


 thanks for giving reply in advance





I want to save a VF page as MS Word file. So I've added the attribute




to the apex:page tag. This works but some characters in the final file are replaced with another combinations. For example the hyphen is replaced with —, apostrophe - with ’ and so on. The problem is obviously related to character encoding. It can be solved with modified attribute value


contentType="application/vnd.ms-word; charset=Windows-1252"


That's fine, all text is shown normally. But I need also the default file name in this attribute like this


contentType="application/vnd.ms-word#Test.doc; charset=Windows-1252"


And this value gives the incorrect encoding again as if I remove charset value. So I can get either the right encoding or the default file name. But I need them simultaneously! I've dug up all the Internet but without any success. Also I tried to add META tag to the page and to modify HTTP headers directly but it didn't work. Can anybody help me with it?

  • June 01, 2011
  • Like
  • 0