• kumar tanwar
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 20
Hi all,

I have an requirement to display list of email templates in visualforce.
like this display list of email templates
i want to do this using apex. can you please suggest, how can i do...

Thank you.
Hi all

I have created a custom button.i want to send mail when i press the button .its working perfectly.but i need to send to specific id like owner of this object and one more id not to all

alert('Add "KYC sent to" email address'); 
{!REQUIRESCRIPT("/soap/ajax/16.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/16.0/apex.js")} 
var msg =sforce.apex.execute("SendkycEmail","kycSendEmail",{id:"{!KYC__c.Id}"}); window.alert(msg); 

Why custom controllers was provided by salesforce if we can achieve same funtionality with standard controller and extensions?
  • May 22, 2015
  • Like
  • 0
please help me to solve this when i enter the values and claic on save fomula expression error is coimng

<apex:page controller="harish">
  <apex:form >
  <apex:pageBlock >
  <apex:commandButton value="save" action="harik"/>
  <apex:pageblockSection >
  <apex:outputLabel value="fax"></apex:outputLabel>
  <apex:inputText value="{!fax}"/>
  <apex:outputLabel value="phone"></apex:outputLabel>
  <apex:inputText value="{!phone}"/>

public class harish {
 public string name{get;set;}
 public string fax{get;set;}
 public string phone{get;set;}
 public void harik(){
 lead ac=new lead();
 insert ac;
Hi everyone i am new to salesforce i had some requirement please tell me 

Create a page which displays a subset of Opportunity fields using apex:outputField components. Bind the Name, Amount, Close Date and Account Name fields to the apex:outputField components.The page must be named 'OppView'.
It must reference the Opportunity standard controller.
It must have an apex:outputField component bound to the Opportunity Name.
It must have an apex:outputField component bound to the Opportunity Amount.
It must have an apex:outputField component bound to the Opportunity Close Date.
It must have an apex:outputField component bound to the Account Name of the Opportunity.

My Answer:
<apex:page standardcontroller="Opportunity">
   <apex:pageBlockTable >
      <apex:outputField value="{!Opportunity.Opportunity Name}"/>
      <apex:outputField value="{!Opportunity.Amount}"/>
      <apex:outputField value="{!Opportunity.Close Date}"/>
      <apex:outputField value="{!Opportunity.Account Name}"/>

Error Displaying:
Error: Missing required attribute value in <apex:pageBlockTable> in OppView at line 3 column 25

Please help to improve my knowledge
I'm getting the error "The outputLink component is not binding to the ID of a case" for this challenge. I've checked several threads on here and I'm almost certain it should be correct. It does link to the details page for the case. 

I initially just had the ID linking but have changed it so both case number and id link via id in case that mattered. 

I've also previously tried having a complete url as the value but no luck. 

Any help would be appreciated.

<apex:page controller="NewCaseListController">
        <apex:pageBlock title="New Case List" id="cases_list">
    <apex:repeat value="{! newcases }" var="cases">
        <apex:outputLink value="/{! cases.id}">
        ID:  {! cases.id }
        <apex:outputLink value="/{! cases.id}">
        Case Number:  {! cases.CaseNumber }
I need help to hide the 'Event' & 'Task' options from create new drop down of home page layout. I believe we can achive this with HTML area and java script ( not very sure on that ). Salesforce has stopped support to HTML Area from Summer 15. 

User-added image

Any help on this will be really appreciated.

Raghavan K.
hi experts,

What is Standard set controller ?
What is the main function of this ?

What is the difference between standardSet controller and CustomSet Controller?
While having StandardSet controller Why we go for CustomSet Controller?

Thanks and Regards,
hi friends,
What is database.queryLocator(). ?
When we will use it ?
What is the difference between Database.QueryLocator() and Database.GetQueryLocator()..

Please help me..
Thanks in Advance..
this is my Vf page
<apex:page controller="RevenueDate" sidebar="False" docType="html-5.0" readOnly="true">           
    <apex:form id="dateren">    
   <apex:commandlink value="Export Excel" action="{!movedatatoexcel}" />
<!--<a href="/apex/RevenueByMonthInExcel2"> Export to Excel</a>-->
    <br></br>    <br></br>    <br></br>

And the Apex class
public without sharing class RevenueDate {

   public PageReference movedatatoexcel() {
       PageReference newPage = page.RevenuewithDatecriteriainExcel;
      newPage.getParameters().put('MyVariable1', string.valueof(fDate));
       newPage.getParameters().put('MyVariable2', string.valueof(tDate) );
        return newPage ;

and the secod Apex class
public  PageReference search() {
                     Fjan =Tjan=jancol =FALSE;                     
                     Ffeb=Tfeb=febcol =FALSE;
                     Fmar=Tmar=marcol =FALSE; 
                     Faprl =Taprl=aprilcol =FALSE;
                     Fmay =Tmay=maycol =FALSE;
                      Fjun =Tjun=junecol =FALSE;
                     Fjul =Tjul=julycol =FALSE; 
                     Faug =Taug=augcol =FALSE;
                     Fsep=Tsep=sepcol =FALSE;
                     Foct =Toct=octcol =FALSE;
                     Fnov =Tnov=novcol =FALSE; 
                     Fdec =Tdec=deccol =FALSE;
            fDate = (Date.valueOf(Apexpages.currentPage().getParameters().get('MyVariable1')));
            tDate = (Date.valueOf(Apexpages.currentPage().getParameters().get('MyVariable2')));  
            // fDate = (Date.valueOf(Apexpages.currentPage().getParameters().get('MyVariable1'))!=NULL?(Date.valueOf(Apexpages.currentPage().getParameters().get('MyVariable1'))):(date.valueof('2014-01-01')));
            //  tDate = Date.valueOf(Apexpages.currentPage().getParameters().get('MyVariable2'));

And this is my test classs
RevenuewithDatecriteriainExcel revenueexcel = new RevenuewithDatecriteriainExcel();
        revenueexcel.fDate  = null;
        revenueexcel.tDate = null;
        revenueexcel.fDate  = date.valueof('2014-01-01');
        revenueexcel.tDate = date.valueof('2014-12-31');

Now i nedd to pass the parmeters of Myvariable1, Myvariable2 in the test class to cover my test class
please help me