0

I have a visual force page that I am rendering as a pdf, the page is reached by clicking a custom button on the object. My issue is that when I open the pdf I can see all fields on the pdf but when other users open the pdf they don't see all the available fields. I have checked the necessary users profile type and they all have read, write edit access to the necessary objects.

As an example none of the fields in the below table are displaying on the pdf except for me.

In the below the Customer__r relation is related to the Account object.

        <table width="100%" style='font-size: 12px'>
        <tr>
            <th width="10%">Bill To:</th>
            <th width="60%"> <apex:outputText value="{!Service_Invoice__c.Customer__r.Name}"/></th>
            <td width="15%">Date:</td>
            <td width="15%"> 
                <apex:outputText value="{0,date,dd/MM/yyyy}">
                    <apex:param value="{!Service_Invoice__c.createdOn__c}" />
                </apex:outputText>
            </td>
        </tr>
        <tr>
            <td></td>
            <td><apex:outputText value="{!Service_Invoice__c.Customer__r.BillingStreet}"/></td>
            <td>Acc No: </td>
            <td><apex:outputText value="{!Service_Invoice__c.Customer__r.SAGE_Id__c}"/></td>       
        </tr>
        <tr>
            <td></td>
            <td><apex:outputText value="{!Service_Invoice__c.Customer__r.BillingCity}"/></td>
            <td>Contract No:</td>
            <td><apex:outputText value="{!Service_Invoice__c.Service_Call__r.Contract_Number__c}"/></td>
        </tr>
        <tr>
            <td></td>
            <td><apex:outputText value="{!Service_Invoice__c.Customer__r.BillingState}"/></td>
            <td>Contract Type: </td>
            <td><apex:outputText value="{!Service_Invoice__c.Service_Call__r.Contract_Type__c}"/></td>
        </tr>
        <tr>
            <td></td>
            <td><apex:outputText value="{!Service_Invoice__c.Customer__r.BillingPostalCode}"/></td>
            <td>Engineer:</td>
            <td><apex:outputText value="{!Service_Invoice__c.Service_Call__r.Engineer__r.Name}"/></td>
        </tr>
        <tr>
            <td></td>
            <td><apex:outputText value="{!Service_Invoice__c.Customer__r.BillingCountry}"/></td>
            <td>Worksheet No :</td>
            <td><apex:outputText value="{!Service_Invoice__c.Reference_No__c}"/></td>
        </tr>
        <tr>
            <td></td>
            <td><apex:outputText value="{!Service_Invoice__c.Customer__r.VAT_No__c}"/></td>
            <td>Cust. order No :</td>
            <td><apex:outputText value="{!Service_Invoice__c.Customer_Order_Number__c}"/></td>
        </tr>
    </table>
  • 2
    Check field Level permission on the profile for other users or if those users have access to referring records – Raul Jan 25 '17 at 15:15
  • The Field Level access is correct, they have at least read access to the fields and the users have access to all the objects above Service_Invoice__c, Customer__c(Account) and Service_Call__c – denisoleary Jan 25 '17 at 15:27
  • Login as any user facing such issue and see if the fields appear in standard layout – Raul Jan 25 '17 at 15:31
  • you have not shared full code. Are you rending based on some condition? Do they have atleast Read access to the Linked objects (Customer, Service Call etc) – Santanu Boral Jan 25 '17 at 15:40
  • @RahulSharma you were correct is was a field level permission. There were two customer fields on the object (both labelled the same) – denisoleary Jan 25 '17 at 16:01
2

First place to identify issue is to look Field level security followed by access of lookup fields. Also checking the filed access in standard layout helps.

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.