3

I am trying to pass a field value from the controller to the VF page. It is a custom object. I have a list that queries a list of records, and I also query a look up field value. I debugged the list and the field value was visible in the logs. But when using it on the page it was blank.

I checked all profile permissions for that user as well, still it didn't work out.

What do you think could be the problem?

1
  • 1
    Can you post your code please ?
    – SF_user
    Sep 30 '14 at 7:44
4

Did you go to Public Access Settings in Sites and verify the field level security and read/edit access for the object?

0
3

You should double check your object and field level permission.

  1. Object permission (This is what you've already checked)
  2. Field level permission (There you have to enable all fields you want to display on a public site)

Another workaround is to store the value in an Apex variable.

public myField {get; set;}

public MyClass{
    myField = myObject.Field__c;
}
1

It had something that got to do with field level security. I was trying to access two levels up, and I had checked the FLS for the second level field, but I had forgotten about the first level itself. Yes, it is field level security.

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.