• Kiran Samileti
  • NEWBIE
  • 5 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hello, I just started to learn Visual Force and I'm making Employee search and delete for my practice.

I started to make a search section first, which are Name, Birthday, and Email section however search results only works Name and Email.

How can I solve this issue?

This is my Page
<apex:page controller="EmployeeDelete2Controller">
    <apex:form >
        <apex:pageBlock title="EmployeeDelete">
            <apex:pageBlockSection columns="1">
                <apex:inputField required = "false" value="{!info.Employee_Name__c}"/>
                <apex:inputField required = "false" value="{!info.Employee_DOB__c}"/>
                <apex:inputField required = "false" value="{!info.Employee_Mailaddress__c}"/>  
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!search}" value="Search"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!results}" var="in">
            	<apex:column value="{!in.Employee_Name__c}"/>
                <apex:column value="{!in.Employee_DOB__c}"/>
                <apex:column value="{!in.Employee_Mailaddress__c}"/>
            </apex:pageBlockTable>            
        </apex:pageBlock>
    </apex:form>
</apex:page>

This is my Controller
 
public class EmployeeDelete2Controller {
    public Employee_Management__c info { get;set; }
    
    public List<Employee_Management__c> results { get;set; }
    
    public EmployeeDelete2Controller(){
        results = new List<Employee_Management__c>();
        info = new Employee_Management__c();
    }
        
    public PageReference search(){
        String strSoqlQuery1;
        string strEmployeeNamec;
        
        String strSoqlQuery2;
        Date strEmployeeDOBc;
        
        String strSoqlQuery3;
        string strEmployeeMailaddressc;

        IF (!String.IsBlank(info.Employee_Name__c)) {
            strEmployeeNamec = info.Employee_Name__c;
            strSoqlQuery1 = 'SELECT Employee_Name__c, Employee_Mailaddress__c, Employee_DOB__c  FROM Employee_Management__c where Id != null and Employee_Name__c = \'' + strEmployeeNamec + '\'';
            results = database.query(strSoqlQuery1);
        }
                
        else if (!String.IsBlank(info.Employee_Mailaddress__c)) {
            strEmployeeMailaddressc = info.Employee_Mailaddress__c;
            strSoqlQuery3 = 'SELECT Employee_Name__c, Employee_Mailaddress__c, Employee_DOB__c  FROM Employee_Management__c where Id != null and Employee_Mailaddress__c = \'' + strEmployeeMailaddressc + '\'';
            results = database.query(strSoqlQuery3);
        }
        
        ELSE IF (info.Employee_DOB__c == null) {          
              Date myDate = date.newInstance(2020, 12, 7);
              strEmployeeDOBc = info.Employee_DOB__c;
              strSoqlQuery2 = 'SELECT Employee_Name__c, Employee_Mailaddress__c, Employee_DOB__c  FROM Employee_Management__c WHERE Employee_DOB__c <= '+ String.valueOf(myDate);
              results = database.query(strSoqlQuery2);

        }

           
        return null;
    }
}


I'm so sorry that my English skill is very poor.
Dear all,

We're looking at the various options of using Salesforce mobile (Salesforce1 application, SF1 Browser, Salesforce Classic in the browser) and are finding limitations with each:

Salesforce 1
  • Overriding the "View" action on an SObject appears to have no effect at all in SF1 and the standard page is displayed
  • The lack of ability to override the Edit action and then return to the normal edit page if the override logic requires it
What have people done to fix their existing overrides when they move to SF1?
 
Salesforce Classic in Mobile
  • If you direct to the full Salesforce classic site in mobile (i.e. switching off the "Enable the Salesforce1 mobile browser app" setting), the UIThemeDisplayed variable still seems to think that the user is in SF1
Lightning Experience
  • With Lightning Experience switched on and "Enable the Salesforce1 mobile browser app" switched off, the user cannot log-in on mobile
  • With Lightning Experience switched on and "Enable the Salesforce1 mobile browser app" switched on, the user is directed to SF1, despite Lightning Experience being responsive to different screen sizes, etc.
Does anybody have any advice, answers or workarounds to these questions? It makes mobile development very difficult when the navigation behaviours/capabilities in the desktop and mobile version differ so wildly.

With thanks,
Andy