• Rakheeb
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 5
    Replies

How can i display error message on visualforce page  and i have code i.e for searching name,phone and email in leads .if name already exist then it will populate appropirate name,email and phone ,if suppose name its not there so i want to display info message.Here i have code but i am not getting error message so kindly let me know the solution ASAP. 

Controller:

public class theController {

   String searchText;
   List<Lead> results;

   public String getSearchText() {
      return searchText;
   }

   public void setSearchText(String s) {
      searchText = s;
   System.debug('SEARCHTEXT:'+searcHText);
   }

   public List<Lead> getResults() {
     
     if(results == null)
      {
       ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, 'my error msg');
      }
   return results;
   }

   public PageReference doSearch() {
    
     results = (List<Lead>)[FIND :searchText RETURNING Lead(Name, Email, Phone)][0];
           
      return null;
   }
}

Page:

 

<apex:page controller="theController">
<apex:messages />
   <apex:form >
      <apex:pageBlock mode="edit" id="block">
         <apex:pageBlockSection >
            <apex:pageBlockSectionItem >
               <apex:outputLabel for="searchText">Search Text</apex:outputLabel>
               <apex:panelGroup >
                  <apex:inputText id="searchText" value="{!searchText}"/>
                  <apex:commandButton value="Go!" action="{!doSearch}"
                                      rerender="block" status="status"/>
               </apex:panelGroup>
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
        <apex:actionStatus id="status" startText="requesting..."/>
        <apex:pageBlockSection title="Results" id="results" columns="1">
           <apex:pageBlockTable value="{!results}" var="l"
                               rendered="{!NOT(ISNULL(results))}">
              <apex:column value="{!l.name}"/>
              <apex:column value="{!l.email}"/>
              <apex:column value="{!l.phone}"/>
           </apex:pageBlockTable>
        </apex:pageBlockSection>
      </apex:pageBlock>
   </apex:form>
</apex:page>

Hi guys ,i am working on sites ,i have build a visual force page on site apart from this what kind of applications we can build on site and also once we build a application on site it is possible to modify it(End user)?So kindly let me know this solution.

Hi gusy ,how can i append the current detail page id on Contact.But i now using visual force we can create like this "select Email from Contact where id = :ApexPages.currentPage().getParameters().get('id')];" but how can i get the id from detail page on conatct so kindly let me know using above query string . 

HI guys , whenever user is created it will generete email i.e username and new password to a perticular user.same thing i am doing on Contact  when the record is created  then i want to generate email to perticular contact person i.e username and new password.So how can i do that kindly let me know solution.

 

 

Between workflow and trigger which will be execute first and let me know the explanation.

 

HI ankit ,kindly let me know the procedure to implement for site with example and also usage of that.

Hi guys,Can anyone let me about single sign On and step by step procedure and also advantages.

HI guys, can anyone  let me know about javasript remoting and advatages,where we need to use and give me the example of that.

What is the use of dreamforce and how it differes from salesforce can any body let me know the solution.

 

Reards

Rakheeb

What is the advantage and disadvantage of  dreamforce and  how can i use in salesforce ,how it differes from salesforce.So kindly let me know ASAP.

HI guys , whenever user is created it will generete email i.e username and new password to a perticular user.same thing i am doing on Contact  when the record is created  then i want to generate email to perticular contact person i.e username and new password.So how can i do that kindly let me know solution.

 

 

I have installed the Force.com for Facebook package from http://code.google.com/p/force4facebook/wiki/Installing_the_Toolkit

 

I have followed everything as per the above link, after that when i goto the sites /apex/MyHomePage it gives me the following error in the site:

 

"Sorry for the inconvenience. We'll be back shortly. Please email us if you need to get in touch."

 

and through email i received the following error information:

 

Apex script unhandled exception by user/organization: 005A0000001KhMN/00DA00000009MmR

Visualforce Page: /apex/sitelogin

caused by: System.NullPointerException: Attempt to de-reference a null object

Class.FBCAuthenticator.value: line 35, column 45
External entry point

Debug Log:
20.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO

 

Kindly help in resolving this issue.