+ Start a Discussion
Prabitha SPrabitha S 

anybody explain this clerly why like this error occur

Error: Compile Error: sObject type 'Registration__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. at line 18 column 18





public class LoginAuthentication {
  public String username  {get;set;}
  public String password {get;set;}
 
  public pageReference loginCheck() {
    List<Registration__c> regLst = new List<Registration__c>();
    pageReference pr;
    if(username == '') {
      ApexPages.addMessage(new ApexPages.Message(
      ApexPages.severity.Error,'Please Enter Username.'));
    }
    else {
      if(password == '') {
        ApexPages.addMessage(new ApexPages.Message(
        ApexPages.severity.Error,'Please Enter Password.'));
      }
      else {
        regLst = [select id, username__c, password__c from Registration__c
        where username__c =: username];
        if(regLst.size() == 0) {
          ApexPages.addMessage(new ApexPages.Message(
          ApexPages.severity.Error,'Username does not exist'));
        }
        else {
          if(regLst[0].password__c != password) {
            ApexPages.addMessage(new ApexPages.Message(
            ApexPages.severity.Error,'Password does not exist'));
          }
          else {
            pr = new pageReference('/apex/Welcome');
          }
        }
      }
    }
    return pr;
  }
}
Ravikant kediaRavikant kedia

Have you actually created such object in your Salesforce instance? There are some standard objects (like User) and you most likely also have the objects related to the CRM product (like Account, Contact, Opportunity) but Registration__c will be a custom object created by you or another System Administrator in your organization.
http://login.salesforce.com/help/doc/en/siteforce_data_access_perms.htm