• Prabitha S
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 0
    Replies
If we want to upload data through DataLoader, what the changes to be done?
will effect one workflow rule to another workflow rule?
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;
  }
}
Error Error: Apex class 'LoginAuthentication' does not exist
Quick Fix Create Apex class 'public with sharing class LoginAuthentication'
Quick Fix Create Apex class 'public class LoginAuthentication'




2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

<apex:page sidebar="false" showheader="false" tabStyle="Employee__c" controller="LoginAuthentication">
<apex:form >
  <apex:pageMessages />
  <apex:pageBlock >
   <div align="left">
    <!-- <apex:image value="{!$Resource.Emplyee_VF_Logo}" style="margin-left:20px"/> -->
    <apex:image url="{!URLFOR($Resource.Emplyee_VF_imgs, 'images/Employees.jpg')}"/>
   </div>
   <div align="center">
    <apex:outputLabel value="Employee Login" style="font-weight:bold;font-size:25px;color:#B80000"/>   
   </div>
   <hr/><br/><br/>
   <apex:pageBlockSection columns="1" title="Please enter your username and password" collapsible="false">
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Username"/>
     <apex:inputtext value="{!username}"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Password"/>
     <apex:inputsecret value="{!password}"/>
    </apex:pageBlockSectionItem>   
   </apex:pageBlockSection>
   <apex:panelGrid columns="3" style="margin-left:60px">
    <apex:commandButton value="Login" action="{!loginCheck}"/>
    <apex:commandButton value="Cancel"/>
    <apex:commandButton value="Register"/>
   </apex:panelGrid>
  </apex:pageBlock>
</apex:form>
</apex:page>
<apex:page standardController="Registration__c" sidebar="false" showheader="false" tabStyle="Employee__c">
<apex:form >
  <apex:pageBlock >
   <div align="left">
    <!-- <apex:image value="{!$Resource.Emplyee_VF_Logo}" style="margin-left:20px"/> -->
    <apex:image url="{!URLFOR($Resource.Emplyee_VF_imgs, 'images/Employees.jpg')}"/>
   </div>
   <div align="center">
    <apex:outputLabel value="Employee Registration__c" style="font-weight:bold;font-size:25px;color:#B80000"/>   
   </div>
   <hr/><br/><br/>
   <apex:pageBlockSection columns="2" title="Please fill your details" collapsible="false">
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="First Name"/>
     <apex:inputtext value="{!Registration__c.First_Name__c}"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Last Name"/>
     <apex:inputField value="{!Registration__c.name}"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Email"/>
     <apex:inputtext value="{!Registration__c.Email__c}"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Username"/>
     <apex:inputtext value="{!Registration__c.Username__c}"/>
    </apex:pageBlockSectionItem>  
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Password"/>
     <apex:inputsecret value="{!Registration__c.Password__c}"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Confirm Password"/>
     <apex:inputsecret value="{!Registration__c.Confirm_Password__c}"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Birthdate"/>
     <apex:inputField value="{!Registration__c.Birthdate__c}"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="City"/>
     <apex:inputField value="{!Registration__c.City__c}"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputLabel value="Country"/>
     <apex:inputtext value="{!Registration__c.Country__c}"/>
    </apex:pageBlockSectionItem>
   </apex:pageBlockSection>
   <apex:panelGrid columns="3" style="margin-left:60px">
    <apex:commandButton value="Submit" action="{!Save}"/>
    <apex:commandButton value="Cancel" action="{!Cancel}"/>   
   </apex:panelGrid>
  </apex:pageBlock>
</apex:form>
</apex:page>