0

I'm working on a professional edition with API enabled and I have a VF page rendering as PDF, with a standard Quote controller. When users with the Standard User profile try to view this VF page they get the Insufficient Privileges error message.

Any idea why?

I feel its not related to the code but still, this is the page's code:

<apex:page standardController="Quote" renderAs="PDF" showHeader="false" 
           applyHtmlTag="false" applyBodyTag="false">
    <html>    
        <head>    
            <style>
                 !!styling removed to shorten the code
            </style>
        </head>    
        <body>       
            <div class="header">
                <left>
                    <apex:image height="50" value="{!$Resource.PDF_Logo}" alt="" title=""/>
                </left>              
            </div>

            <div class="footer">    
                <div>Page <span class="pagenumber"/> of <span class="pagecount"/></div> 
            </div>

            <div class="content">                                   
                <div>
                    <center>
                        <h4>SERVICE QUOTE #{!Quote.QuoteNumber}</h4>
                    </center>
                </div>

                <table style="width:100%" class="table-bordered">
                    <tr>
                        <td class="txtLeft" colspan="3">Quote for: {!Quote.Account.Name}</td>
                        <td class="txtLeft" colspan="3">
                           <apex:outputText value="Quote Preparation Date: {0,date, EEE, d MMM yyyy}">
                               <apex:param value="{!Quote.CreatedDate}" />
                           </apex:outputText>                    
                        </td> 
                    </tr>               
                    <tr>
                        <td class="txtLeft" colspan="3">Prepared for: {!Quote.Contact.Name}</td>
                        <td class="txtLeft" colspan="3">
                           <apex:outputText value="Quote Expiration Date: {0,date, EEE, d MMM yyyy}">
                               <apex:param value="{!Quote.ExpirationDate}" />
                           </apex:outputText>
                        </td>
                    </tr>
                    <tr>
                        <td class="txtLeft" colspan="3"></td>
                        <td class="txtLeft" colspan="3">
                           <apex:outputText value="Service Request Date: {0,date, EEE, d MMM yyyy}">
                               <apex:param value="{!Quote.Service_Request_Date__c}" />
                           </apex:outputText>
                        </td>
                    </tr>                
                    <tr>
                        <td class="txtLeft" colspan="3">Account Manager: {!Quote.Opportunity.owner.Name}</td>
                        <!-- <td class="txtLeft" colspan="3">Minimum Service Term: {!Quote.Minimum_Service_Term__c} Months</td> -->
                        <td class="txtLeft" colspan="3">
                            <apex:outputText value="Minimum Service Term: {0, number} Months">  
                                <apex:param value="{!Quote.Minimum_Service_Term__c}"/>  
                            </apex:outputText>
                        </td>                         
                    </tr>

                    <tr>
                        <th colspan="6" style="border-left:0px; border-right:0px; height:25px;">&nbsp;</th>
                    </tr>   

                    <tr class="txtLeft tableHeader" >
                        <th colspan="6">1. Location</th>   
                    </tr>                           
                    <tr>
                        <td class="txtLeft" colspan="3">Site: {!Quote.Opportunity.Site_Name__c}</td>
                        <td class="txtLeft" colspan="3">Link: {!Quote.Opportunity.Link_Name__c}</td>               
                    </tr>

                    <tr>
                        <td style="border:none; height:30px;" colspan="6">&nbsp;</td>
                    </tr>

                    <tr class="tableHeader">
                        <th colspan="6">2. Pricing Model: {!Quote.Pricing_Model__c}</th>
                    </tr>                  
                    <tr class="tableSubHeader">
                        <th>
                            <img src="/img/check.gif" />
                        </th>                    
                        <th style="width:25%">
                            {!IF(ISBLANK(Quote.PDF_s_Products_Column_Header__c), 'Products', Quote.PDF_s_Products_Column_Header__c)}
                        </th>

                        <th style="width:19%">
                            <!-- {!Quote.PDF_s_Quantity_Column_Header__c} -->
                            {!IF(ISBLANK(Quote.PDF_s_Quantity_Column_Header__c), CASE(Quote.Pricing_Model__c, 'Fixed Rate', 'Quantity / Managed Capacity (Mbps)', 
                                                           'Managed Capacity (95/5)', 'Quantity / Minimum Managed Capacity (Mbps)', 
                                                           'Generated Capacity (95/5)', 'Quantity / Minimum Managed Capacity (Mbps)',
                                                           'No pricing Model'), Quote.PDF_s_Quantity_Column_Header__c)}
                        </th>
                        <th style="width:19%">
                            <!-- {!Quote.PDF_s_Unit_Price_Column_Header__c} -->
                            {!IF(ISBLANK(Quote.PDF_s_Unit_Price_Column_Header__c), CASE(Quote.Pricing_Model__c, 'Fixed Rate', 'Unit Price / Price per Burstable Capacity (Mbps)', 
                                                           'Managed Capacity (95/5)', 'Unit Price / Price per Mbps (Managed)', 
                                                           'Generated Capacity (95/5)', 'Unit Price / Price per Mbps (Generated)',
                                                           'No pricing Model'), Quote.PDF_s_Unit_Price_Column_Header__c)}
                        </th>
                        <th style="width:19%">
                            <apex:outputText value="{!Quote.PDF_s_NRC_Column_Header__c}" rendered="{!NOT(ISBLANK(Quote.PDF_s_NRC_Column_Header__c))}"/>
                            <apex:outputPanel rendered="{!ISBLANK(Quote.PDF_s_NRC_Column_Header__c)}">
                                NRC <br/> (Non Recurring Charges)
                            </apex:outputPanel>
                            <!-- {!IF(ISBLANK(Quote.PDF_s_NRC_Column_Header__c), 'NRC (Non Recurring Charges)', Quote.PDF_s_NRC_Column_Header__c)} -->
                        </th>
                        <th style="width:19%">
                            <!-- {!Quote.PDF_s_MRC_Column_Header__c} -->

                            {!IF(ISBLANK(Quote.PDF_s_MRC_Column_Header__c), CASE(Quote.Pricing_Model__c, 'Fixed Rate', 'MRC (Monthly Recurring Charges)', 
                                                           'Managed Capacity (95/5)', 'MRC (Monthly Recurring Charges)', 
                                                           'Generated Capacity (95/5)', 'MRC (Monthly Recurring Charges)*',
                                                           'No pricing Model'), Quote.PDF_s_MRC_Column_Header__c)}
                        </th>                                                            
                    </tr>

                    <!--  MRC Table -->
                    <apex:repeat value="{!Quote.QuoteLineItems}" var="quoteItem">
                        <tr class="{!CASE(quoteItem.Product2.Charges_Recurrance__c, 'MRC', '', 'hidden')}">
                            <td>
                                <img src="/img/check.gif" />
                            </td>
                            <td class="txtLeft">
                                {!quoteItem.Product2.Name}
                            </td>
                            <td class="txtRight">
                                {!quoteItem.Quantity}
                            </td>
                            <td class="txtRight">                                   
                                <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                    <apex:param value="{!quoteItem.UnitPrice}"/>  
                                </apex:outputText>                                  
                            </td>
                            <td class="txtRight">                                   
                                <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                    <apex:param value="{!quoteItem.Non_Recurring_Charges_NRC__c}"/>  
                                </apex:outputText>                                  
                            </td>
                            <td class="txtRight">                                   
                                <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                    <apex:param value="{!quoteItem.Monthly_Recurring_Charges_MRC__c}"/>  
                                </apex:outputText>                                  
                            </td>                               
                        </tr>                                         
                    </apex:repeat>
                    <!--  NRC Table -->
                    <apex:repeat value="{!Quote.QuoteLineItems}" var="quoteItem">
                        <tr class="{!CASE(quoteItem.Product2.Charges_Recurrance__c, 'MRC', 'hidden', '')}">
                            <td>
                                <img src="/img/check.gif" />
                            </td>
                            <td class="txtLeft">
                                {!quoteItem.Product2.Name}
                            </td>
                            <td class="txtRight">
                                {!quoteItem.Quantity}
                            </td>
                            <td class="txtRight">                                   
                                <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                    <apex:param value="{!quoteItem.UnitPrice}"/>  
                                </apex:outputText>                                  
                            </td>
                            <td class="txtRight">                                   
                                <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                    <apex:param value="{!quoteItem.Non_Recurring_Charges_NRC__c}"/>  
                                </apex:outputText>                                  
                            </td>
                            <td class="txtRight">                                   
                                <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                    <apex:param value="{!quoteItem.Monthly_Recurring_Charges_MRC__c}"/>  
                                </apex:outputText>                                  
                            </td>                               
                        </tr>                                         
                    </apex:repeat>

                    <tr>
                        <td colspan="6" class="txtLeft" style="font-style:italic;">
                            Notes:

                            <apex:outputtext value="{!Quote.Notes__c}" escape="false"/>
                        </td>
                    </tr>                

                    <tr>
                        <td colspan="6" style="border:none; height:30">&nbsp;</td>
                    </tr>

                    <tr class="tableHeader">
                        <th colspan="4">3. Service Quote Total (Excluding VAT &amp; Tax)</th>
                        <th class="textCenter">
                            <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                <apex:param value="{!quote.NRC_excl_VAT_TAX__c}"/>  
                            </apex:outputText> 
                        </th>
                        <th class="textCenter">
                            <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                <apex:param value="{!quote.MRC_excl_VAT_TAX__c}"/>  
                            </apex:outputText>                     
                        </th>
                    </tr>
                    <tr class="">
                        <th colspan="4">VAT &amp; Tax</th>
                        <th class="textCenter">
                            <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                <apex:param value="{!quote.NRC_VAT_Tax__c}"/>  
                            </apex:outputText>
                        </th>
                        <th class="textCenter">
                            <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                <apex:param value="{!quote.MRC_VAT_Tax__c}"/>  
                            </apex:outputText>                    
                        </th>
                    </tr>
                    <tr class="tableHeader">
                        <th colspan="4">Service Quote Total (Including VAT &amp; Tax)</th>
                        <th class="textCenter">
                             <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                <apex:param value="{!quote.NRC_Grand_Total__c}"/>  
                            </apex:outputText>                   
                        </th>
                        <th class="textCenter">
                            <apex:outputText value="{!Quote.Opportunity.CurrencyIsoCode} {0, number, ###,###,###,##0.00}">  
                                <apex:param value="{!quote.MRC_Grand_Total__c}"/>  
                            </apex:outputText>                    
                        </th>
                    </tr>
                    <tr>
                        <th colspan="6" style="border-left:0px;border-right:0px">&nbsp;</th>
                    </tr>
                    <tr class="tableHeader" style="{!IF(Quote.QuoteLineItems.size > 8, 'page-break-before:always','')}">
                        <th colspan="6">4. General Terms</th>
                    </tr>
                    <tr>
                        <td colspan="6" class="txtLeft" style="font-style:italic; height:30px;">
                            <apex:outputtext value="{!Quote.Terms_and_Conditions__c}" escape="false"/>
                        </td>
                    </tr>                
                </table>      
            </div>  
        </body>
    </html>
</apex:page>
2

Did you check the security on the page itself?
Setup | Develop | Pages then, look at the list of pages, and select the security option for the page in question. Make sure that everyone has access to the page.

  • I think that in the PE you cannot access the security settings for pages – Dedo May 5 '15 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.