• dkraun123
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
I have run into this error message when trying to use dynamic SOQL for the first time. I am running the query in a managed package, but the object I am working with is in the same managed package, the package api is unrestricted, and my profile is system admin with full rights. Can anyone think of any other settings that would be causing restricted access?

-David
I have run into this error message when trying to use dynamic SOQL for the first time. I am running the query in a managed package, but the object I am working with is in the same managed package, the package api is unrestricted, and my profile is system admin with full rights. Can anyone think of any other settings that would be causing restricted access?

-David
Hi,

A week or so ago, I became unable to submit any visualforce forms that access custom objects/fields. Just in case my code could have been the problem, I made a very simple test page, and it shows the same problem. The test page is (I took out the
apex:page controller="testController"
apex:pageMessages id="pageMessages"
apex:form
apex:pageBlock
apex:pageBlockButtons
apex:commandButton value="Test" action="{!test}" rerender="pageMessages"
apex:pageBlockButtons

apex:pageBlockSection
apex:inputField value="{!testContact.Type__c}"
apex:pageBlockSection
apex:pageBlock
apex:form
apex:page

and the controller is:

public class testController
{
CRM_Contacts__c testContact = new CRM_Contacts__c();
public CRM_Contacts__c getTestContact()
{
return testContact;
}

public void test()
{
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, testContact.Name));
}
}


Type__c is a picklist and when I first pull up the page, the picklist displays just fine with all of its values. The problem occurs when I click on the "Test" button to submit the form. I get the following visualforce error:

Could not resolve field 'Type__c' from <apex:inputField> value binding '{!testContact.Type__c}'


This same type of error occurs on every visualforce page, even pages that used to work and that I have not changed. Salesforce support said that they are unable to help with visualforce problems, so I was just wondering if anyone has seen anything like this before.

Thanks,
David

Message Edited by dkraun123 on 09-25-2008 11:33 PM

Message Edited by dkraun123 on 09-25-2008 11:35 PM

Message Edited by dkraun123 on 09-25-2008 11:39 PM
I have run into this error message when trying to use dynamic SOQL for the first time. I am running the query in a managed package, but the object I am working with is in the same managed package, the package api is unrestricted, and my profile is system admin with full rights. Can anyone think of any other settings that would be causing restricted access?

-David
I have run into this error message when trying to use dynamic SOQL for the first time. I am running the query in a managed package, but the object I am working with is in the same managed package, the package api is unrestricted, and my profile is system admin with full rights. Can anyone think of any other settings that would be causing restricted access?

-David
I have a pick list and I am trying to create a clear button that clears the value. This is pretty simple but I can't seem to figure it out.

Here is the simple code to reproduce:

Code:
PAGE:
<apex:page controller="clearCon" action="{!load}">
    <apex:form>
        <apex:pageBlock >
           <apex:pageBlockButtons location="bottom">
               <apex:commandButton value="Clear Criteria" action="{!clear}" rerender="industry"/>
           </apex:pageBlockButtons>
           <apex:pageBlockSection columns="2" id="industry">
               <apex:inputField value="{!acct.Industry}"/>
           </apex:pageBlockSection>
       </apex:pageBlock>
   </apex:form>
</apex:page>

Controller:
public class clearCon {

    public Account acct {get; set;}
     
    public PageReference load() {
        acct = new Account();
        return null;
    }
    
    public PageReference clear(){
        acct.Industry = null;
        return null;
    }

}

 



Message Edited by TehNrd on 10-07-2008 08:52 AM
  • October 06, 2008
  • Like
  • 0