• d.sureshkumar41.33978150573839
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 11
    Replies
Hi,
        I'm looking to use Global variables in portal header html file but it is not working and the portal is used with site.I tried like below. 

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
        <script src="/resource/jquery/jquery-183.js"></script>
        <script> 
            window.onload = setupPage;
            function setupPage(){
                var siteId = '{!$Site.SiteId}';
                console.log('====siteId====='+siteId);
            }
        </script>
    </head>
    <body>
    </body>
</html>
I am not getting siteId.

Any ideas gratefully received.
Thanks in advance.
 

I WANT THE NAME AS LINK TO OPEN THE LEAD RECORD. BUT IT IS COMING AS HARD CODED.

 

 

 

 

trigger TriggerOnLead on Lead (before insert) {
 
    Map<String, Lead> mapLead = new Map<String, Lead>();
    
    for (Lead lead : System.Trigger.new) {
          mapLead.put(lead.Email, lead);
    }
    
    for (Lead lead : [SELECT Id,Name,Email FROM Lead
                      WHERE Email IN :mapLead.KeySet()]) {
        Lead newLead = mapLead.get(lead.Email);
       newLead.Email.addError('<a href="https://ap1.salesforce.com/'+ lead.id +'">Agency Name '+ lead.name + '</a>');
       
    }
}

 

 

 

 

Hi I have two vf pages

   1.searchfunctionalitypage

   2. layout page.

 

     In the first page i have picklist for selecting object , textbox for entering searchcharacters and  go button when we click on the go button i want hide the vfpages in another layoutpage and show the search results for the first page.

 

         the two vf pages use the same controller.

 

the first page code is

 

vfpage:(searchfunctionalitypage)

 

   <apex:page showHeader="false" controller="CLS_SearchFunction">
<apex:form >

<html>

<body>
 
<div class="online_serviceContainer">
        
          <div class="online_serviceBox">
            
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                 <!---    <tr>
                 <td colspan="3" class="title">Search</td>
                  </tr>  
                  <tr>
                    <td width="10%">&nbsp;</td>
                    <td width="70%">&nbsp;</td>
                    <td width="20%">&nbsp;</td>
                  </tr> --->
                  <tr>
                  <td>&nbsp;</td>
                  <td>
                    <apex:selectList value="{!selectedobj}" size="1" style="Width:160px">
                    
                          <apex:selectOption itemValue="Search All" itemLabel="Search All"/>
                    
                          <apex:selectOption itemValue="Case" itemLabel="Case"/>
                    
                          <apex:selectOption itemValue="Account" itemLabel="Account"/>
                    
                   </apex:selectList> <br/>
                   
                   <apex:inputtext value="{!searchtext}" style="Width:120px" /> <br/>
                   
                   <apex:commandButton value="Go!" action="{!searching}" />
               
                          
                    
                    </td>
                    <td>&nbsp;</td>
                    
                    
                    
                  </tr>  
                  
                  <tr>
                    <td style="height:110px;">&nbsp;</td>
                    <td style="height:110px;">&nbsp;</td>
                    <td style="height:110px;">&nbsp;</td>
                  </tr>
                </table>
                
          </div>
            
        </div>
  </body>
</html>  
</apex:form>
</apex:page>

 

 

the second vf page (layout page)

 

<apex:page showHeader="false" controller="CLS_SearchFunction" >
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"/>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
<META HTTP-EQUIV="Expires" CONTENT="0"/>

<html>
  <body>
   <table width="100%" height="auto" border='0'>
    <tr>
      <td width='33%'><apex:iframe src="/apex/iTWOnlineServiceComponent" scrolling="false" id="theIframe1" height="300px" /></td>
      <td width='33%'><apex:iframe src="/apex/WhatsNew"  scrolling="false" id="theIframe2" height="300px" /></td>
      <td width='34%'><apex:iframe src="/apex/VF_SupportCenter"  scrolling="false" id="theIframe3" height="300px" /></td>
    </tr>
  </table>
 
  <table width="100%" height="auto" border='0'>
   <tr >
      <td ><apex:iframe src="/apex/VF_SearchFunctionality" scrolling="false" id="theIframe4" width="1050px" height="300px"/></td>
    <!---  <td ><apex:iframe src="/apex/VF_RecentItem" scrolling="false" id="theIframe5" height="300px"/></td> --->
   
   </tr>
   </table>
   
   <!---  <table width="100%" height="auto" border='0'>
   <tr>
      <td width='25%'><apex:iframe src="/apex/VF_SearchbuttonFunctionality" scrolling="false" id="theIframe6" height="320px" /></td>
   </tr>
   <td> </td>  
      
   </table> --->
   
  
 

</body>
</html>
</apex:page>

 

 

the class is

 

public class CLS_SearchFunction {

   
    public LIST<LIST<SObject>>  searchresults{get;set;}
    
    public list<Case> Cslst{get;set;}
    
    public list<Account> Acclst{get;set;}
           
    public string searchtext{ get ; set;}
    
    public string selectedobj{ get; set;}
                
    public string qry{get;set;}
    
    public boolean searchbl{get;set;}
    
    public static boolean searchbl1{get;set;}
    
    public CLS_SearchFunction()
    
    {
           searchresults = new LIST<LIST<SObject>>();  
                  
              Cslst         = new list<Case>();
                  
              Acclst        = new list<Account>();
       

    }
    
    
    public void searching() {
    
          
        
        
        
           searchresults.clear();
           
           system.debug('12345678'+searchresults.size());
           
           Cslst.clear();
           
           Acclst .clear();   
           
      if(searchtext.length() >= 2 )
                 
        {
           if(searchtext !=null && searchtext != '' )
           
           {
         
           qry = 'FIND \'' +searchtext+'*\' IN ALL FIELDS RETURNING Case(casenumber,subject,id),Account(name,ownerid,id)';
        
           searchresults=search.query(qry);  
           
           system.debug('12345'+searchresults);
           
           }
           
          if(searchresults.size() > 0)
              
          {
               
           Cslst   = searchresults[0];
           
           system.debug('12345cs'+Cslst   );
               
           Acclst  = searchresults[1];
                
          }
          
          if((selectedobj == 'Search All')  &&  (Cslst.size() == 0) && (Acclst.size() == 0))
               {
                       
                      apexpages.message acctmsg=new apexpages.message(apexpages.severity.info,'No records found meeting your criteria');
                                 
                      apexpages.addmessage(acctmsg);
                                 
                       system.debug('pppp'+acctmsg);           

              }
              
           else  if((selectedobj == 'Case')  &&  (Cslst.size() == 0))
               {
                       
                      apexpages.message acctmsg=new apexpages.message(apexpages.severity.info,'No Case records found meeting your criteria');
                                 
                      apexpages.addmessage(acctmsg);
                                 
                       system.debug('pppp'+acctmsg);           

              }
              
            else if ((selectedobj == 'Account') && (Acclst.size() == 0))
           
              {
           
                     apexpages.message acctmsg=new apexpages.message(apexpages.severity.info,'No Account records found meeting your criteria');
                                 
                      apexpages.addmessage(acctmsg);
                                 
                       system.debug('pppp'+acctmsg);         
              }
        
      }
      
       else
        
        {    
        
          apexpages.message acctmsg1=new apexpages.message(apexpages.severity.error,'search term must be Contains two characters');
                                 
          apexpages.addmessage(acctmsg1);
       }   

        
     /* Pagereference p= page.Vf_CustomerportalLayout;
        p.setredirect(false);
        return null; */
    }
    
    public PageReference back()
     {
      
       Pagereference pr= page.VF_SearchbuttonFunctionality;
        pr.setredirect(false);
        return pr;
    }  
        
       
 
}

 

  PLZ help me.Thnx in advance.

      

  Hi,
          I created the pdf with visualforce using renderAs="pdf" .This pdf contain 13 pages.The data in the  pages aligned    perfectly in chrome but it didn't aligned in firefox.Pls help me.
  

       

Hi I want to create one vf page in that i want to show one table with two columns and those are lead owner and ratio of proposed leads by capped leads.

   lead owner                     ratio



proposed is the lead status and capped also lead status .

suppose in a day 10 leads are created in that first owner have  2 are proposed leads and  1 capped lead then we show the ratio of  2/1 for that owner and second owner have 3  proposed leads and 2 capped leads we show the ratio of  3/2 and third owner have 2 proposed leads and 0 capped leads we show the ratio N/A.

      PLZ help me.

  Hi,
          I created the pdf with visualforce using renderAs="pdf" .This pdf contain 13 pages.The data in the  pages aligned    perfectly in chrome but it didn't aligned in firefox.Pls help me.
  

       

Hi I want to create one vf page in that i want to show one table with two columns and those are lead owner and ratio of proposed leads by capped leads.

   lead owner                     ratio



proposed is the lead status and capped also lead status .

suppose in a day 10 leads are created in that first owner have  2 are proposed leads and  1 capped lead then we show the ratio of  2/1 for that owner and second owner have 3  proposed leads and 2 capped leads we show the ratio of  3/2 and third owner have 2 proposed leads and 0 capped leads we show the ratio N/A.

      PLZ help me.

OK, here is what I have gotten correct.  I enabled a portal and checked the box that says "Self-Registration Enabled".  Then I tested the page and got the two options for "Secure Customer Login" and "Don't have an Account?" on the login_portal.jsp page.  I search and found a PPT presentation in the documentation that describes how to replicate the "Secure Customer Login" side of the screen in a VisualForce page with our branding etc.

 

http://wiki.developerforce.com/images/1/12/Customer_Portal_implementation_guide-1-.ppt

 

However, I cannot find how to replicate the right side "Don't have an Account?" function.  Can someone point me to a how-to on that side?

Hi All,

 

I need to add vf components in Customer Portal Home Page layout. Please see below my code

 

HTML Link:

<iframe src="/apex/Custom_Home" frameborder="0" width="100%"></iframe>&nbsp;

 

Vf page: 

<apex:page ">
<c:newsTopics />

</apex:page>

 

Vf component: 

<apex:component controller="CustomerPortalStartPageController">
<apex:pageBlock title="Top 5 Topics" >
<apex:pageBlockTable value="{!newsTopics}" var="top5">
<apex:column>
<apex:outputLink value="{!news.Article_URL__c}">{!news.Title__c}</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:component>

 

However, when i see home page, its just showing the iframe code..not actual vf page.

 

Any suggestions?

 

Regards,

R

Hello All,

 

I have an inline visulaforce page in my Case Pagelayout. I want to refresh it on a particular click event. How can we make it possible. Please help me regarding this issue.

 

 

Thank you!

 

Regards,

Lakshman

I have received several emails "Salesforce.com workflow could not perform a pending action" with 

Error Number: 858880459-3664 (-1072421861)

Where can I find the description of this error?

  • August 13, 2010
  • Like
  • 0

Hi All,

 

I would like to hide/disable edit link on list view:

 

Action      Description        Modified Date

Edit | Del  blah blah blah     12/12/1990

Edit | Del  blah blah blah      01/01/2001

 

Is that possible?

I have a page that defines an inputText component with required="true" but when the page renders, the input box doesn't have the red bar indicating that it's required.

My page looks like this:

<apex:page standardController="Contact">
<apex:form >
  <apex:outputLabel value="Birthdate" />
  <apex:inputText value="{!Contact.birthdate}" required="true" />
</apex:form>
</apex:page>

 When the page is displayed, the vertical red "required" bar doesn't precede the input box.

If I add a Save button to the page and click it, the field does act as if a value is required. (Contact.Birthdate is required in my org). The problem is that the UI doesn't display the "required" visual cue.

This is pretty simple stuff. What am I doing wrong?

Jeri


I know i can do the following to get userid,firstname,lastname by using the static UserInfo class. But there is no method to get Email address. How do i get email address in a controller??

  String userId = UserInfo.getUserId();
String firstName = UserInfo.getFirstName();
String lastName = UserInfo.getLastName();

I know i can do {!$User.Email} but that would only be in the visualforce pages.
How do I get the email address of the logged in user in controller.