+ Start a Discussion
Jim BoudreauxJim Boudreaux 

Developer Edition Sites

Is there a permissions issue with custom fields in a Developer Edition Site? I made a simple little visualforce page that displays the name standard field as well as a couple custom fields. It works fine in the org, but despite setting all the public permissions correctly, when I try to view the page on the site, the only field that is rendered is Name.

 

http://imfromthepast-developer-edition.na8.force.com/properties?id=a01C000000OeqM8

 

 

<apex:page Controller="Property" showHeader="false">
    <div style="margin:auto; width:1000px;">
        <div style="width:100%; float:left;">
            <div style="width:170px; float:left;">
                <apex:image value="{!URLFOR($Action.Attachment.Download, logo)}"/>
            </div>
            <div style="width:800px; height:100px; float:left; line-height:180px; text-align:right; font-size: 10pt">
                HOME | PHOTO GALLERY | FLOOR PLANS | AMENITIES | LOCATION | LEASING | RESIDENTS
            </div>
        </div>
        <div style="width:100%; float:left;">
            <div style="width:170px; height:362px; float:left; color:white; border: 0px solid #c0c0c0; padding:0px; text-align:left; background:#9c9b8d">
                <div style="border-bottom:2px solid white; padding:10px; font-size:15pt">View Community</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">HOME</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">PHOTO GALLERY</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">FLOOR PLANS</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">AMENITIES</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">LOCATION</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">LEASING</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">RESIDENTS</div>
            </div>
            <div style="width:780px; float:left; border: 1px solid #c0c0c0; margin-left:5px; padding:5px">
                <apex:repeat value="{!property.attachments}" var="a">
                    <apex:image value="{!URLFOR($Action.Attachment.Download, a.id)}"/>
                </apex:repeat> 
            </div>
            <div style="width:780px; height:100px; float:left; border: 1px solid #c0c0c0; margin-left:0px; padding:5px"> 
                {!property.overview__c}
            </div> 
            <div style="width:163px; height:100px; float:left; border: 1px solid #c0c0c0; margin-left:0px; padding:5px"> 
                <apex:outputtext value="{!property.name}"/><br/>
                <apex:outputtext value="{!property.street__c}"/>
            </div>          
        </div>
    </div>   
</apex:page>

 

public class Property {
    string id = apexpages.currentpage().getparameters().get('id');
    public property__c getProperty() {
        return [select name,street__c, city__c, features__c, state__c, zip__c, overview__c, phone__c, fax__c, (select id from attachments where name = 'Image.jpeg') from property__c where id = :id];
    }
    public string getLogo(){
        return [select id from Attachment where parentid = :id and name = 'logo.png'].id;
    }

}

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
EIE50EIE50

Hi jim,

 

By default, under public access settings, you can set up the following settings (but not limited to) :

  - Page Layouts

  - Field level security

  - Custom App Settings

  - Tab Settings

  - Record Type Settings

  - Administrative Permissions

  - General User Permissions

  - Standard Object Permissions

  - Custom Object Permissions

 

Do not click on EDIT button in the Public Access Settinggs profile, Rather navigate to the field level securtiy section and click on View to see your FLS where you will be navigated to FLS for profile page, here you can edit the visibility. After you edit one, go back to profile adn edit rest of the fields in the same way.

 

Thanks.

 

 

All Answers

Pradeep_NavatarPradeep_Navatar

It may be possible that street__c and overview__c fields are blank in that record and that is why it is showing blank on the VF page. If name field is rendered then all the fields should be rendered on the VF page. You need check this in system debug.

Jim BoudreauxJim Boudreaux

they are not blank, and they show up when I am looking at that VF page in my developer salesforce org (as opposed to on the site page).I set the public access which allowed me to edit the permissions of the profile associated with people viewing the site. I gave View all permission to the profile for the custom object underlying the page, I made sure all the fields were on the page layout, I gave all my profiles permission to access the VF page, I did everything I can think of. The thing is, this isn't my first time doing this, but it is the first time I've done it on a Dev Edition, so that's why Im wondering if that's the issue.

joshbirkjoshbirk

There's no distinction between DE and other accounts when it comes to the visibility of the fields, it is all driven from the same security framework.

 

From the list of actions you provide, the first thing that comes quickly to mind is checking the sharing rules on the object itself.

Jim BoudreauxJim Boudreaux

http://cl.ly/093z0h19270o0F1H3s2W

This is what it looks like when I am in the org, editing the page. As you can see, there is data in the custom fields. 

 

http://cl.ly/0b3y1L2Q1x091R373s25

The profile for this Site is set to have Read Access to the Property__c custom object.

 

http://cl.ly/1t2x0x193E470p1r3U2Z

Sharing rules for the Property__c custom object.

 

Anything else?

Jim BoudreauxJim Boudreaux

something somewhere just doesn't like custom objects. I added two subqueries to the controller that selected the name field and a custom field from two related objects that share a Master-Detail relationship with the Property__c object. When I stick those in a repeat tag and display the name and the custom field, everything looks fine on the VF page in the org, but the Site version only displays the names.

joshbirkjoshbirk

Sorry, wasn't sure from the above the description - you checked Field Level Security as well?

Jim BoudreauxJim Boudreaux

I would except that the field level security settings are profile based and the profile associated with the Property Page is not listed. In fact the only way I've been able to access the Property Profile is by clicking the Public Access Settings button on my Site page, but it has no field level security options, only object level.

http://cl.ly/3p1o1N3w2Z0j2L0y2f21

EIE50EIE50

Hi jim,

 

By default, under public access settings, you can set up the following settings (but not limited to) :

  - Page Layouts

  - Field level security

  - Custom App Settings

  - Tab Settings

  - Record Type Settings

  - Administrative Permissions

  - General User Permissions

  - Standard Object Permissions

  - Custom Object Permissions

 

Do not click on EDIT button in the Public Access Settinggs profile, Rather navigate to the field level securtiy section and click on View to see your FLS where you will be navigated to FLS for profile page, here you can edit the visibility. After you edit one, go back to profile adn edit rest of the fields in the same way.

 

Thanks.

 

 

This was selected as the best answer
Jim BoudreauxJim Boudreaux

Dude, I wish I could kiss you. That was it, thank you soooo much. This was driving me nuts.