• hamshu
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 16
    Replies
HI All ,

Any One help to write test class for below statement..

List<Opportunity> updateSuccessorOpportunity = new List<Opportunity>([select id, StageName,Future_Follow_Up_Date__c, ( SELECT Subject, status FROM Tasks ) FROM Opportunity where ID in :SuccessorOpportunityID]);   

for(Opportunity UpdateSucOpp: updateSuccessorOpportunity)
             {
                  successorTaskCount=0;
                   for(Task ct: UpdateSucOpp.Tasks)
                   {
                     if(UpdateSucOpp.StageName == 'Document Review' && ct.Subject == 'Review Trust Agreement' && ct.status=='Completed'){
                         UpdateSucOpp.StageName='Document Acceptable';
                         update updateSuccessorOpportunity;
                     }
                     if(UpdateSucOpp.StageName == 'Document Acceptable' && ct.Subject == 'Trust Document Qualifies' && ct.status=='Completed'){
                         UpdateSucOpp.StageName='Acknowledgement Pending';
                         update updateSuccessorOpportunity;
                     }
                     if( UpdateSucOpp.StageName == 'Acknowledgement Pending' && ((ct.Subject == 'Acknowledgement Letter (Welcome Kit) Sent' && ct.status=='Completed') ||(ct.Subject == 'Successor Trustee Record Completed' && ct.status=='Completed') ||(ct.Subject == 'Create Successor Trustee File' && ct.status=='Completed') || (ct.Subject == 'Future Follow Up Date' && ct.status=='Completed'))){
                     {
                         successorTaskCount++;
                     if(successorTaskCount==4)
                     {
                         UpdateSucOpp.StageName='Completed';
                         update updateSuccessorOpportunity;
                         successorTaskCount = 0;
                     }
                      }
                   }
  • January 23, 2014
  • Like
  • 0

HI,

 

Any One Came accross like this

 

trigger DuplicateLead on lead (before insert,before update)
{
 
         Set<string> lastname= new Set<string>();
   
      
        for(lead lead : Trigger.new)
         {
             string getjoin=lead .firstname+' '+lead .lastname;
              system.debug(getjoin);output=Sam Kumar
             lastname.add(getjoin );
             system.debug(getjoin);OutPUT:{Sam Kumar} Why ? And How to remove this
         }

}

 

Thanks,

Jaba

  • November 19, 2013
  • Like
  • 0

 

HI all,

 

Any one can help me out for this migration.....i want  move some file from salesforce to ftp by apex class..

 

If its possiable means please send the step to do.

 

 

 

 

Thanks,

jaba

  • November 12, 2013
  • Like
  • 0


HI all,


trigger DuplicateEmail on contact( before insert, before update) {
    Map<String, contact> contactMap = new Map<String, contact>();
      for (contact contact: System.Trigger.new) {
        if ((contact.Email!= null) &&
                  (System.Trigger.isInsert ||
                  (contact.Email!=
                      System.Trigger.oldMap.get(contact.Id).Email ))) {
      if (contactMap.containsKey(contact.Email )) {
                  contact.Email.addError('same email.');
              } else {
                  contactMap .put(contact.Email , contact);     
                           }
        }
      }
       for (contact contact: [SELECT Email  FROM contact WHERE Email IN :contactMap.KeySet()])
      {
          contact newcontact  = contactMap .get(contact.Email );
          newcontact.Email.addError('Email is already exhists with another contact ');
      }
  }

 

Not able to test Following lines...

 

My TEst Class:

@istest
public class testcontactemail
{
    public static testmethod void testemail()
    {
        account acc=new account();
        acc.name='test account';
        acc.Lead_Source__c='Website';
        insert acc;
        
        contact con=new contact();
        con.email='jabaraj.jaba@gmail.com';
        con.lastname='raj';
        con.accountid=acc.id;
        
        Exception e;
        
     /*   contact con1=new contact();
        con1.email='jabaraj.jaba@gmail.com';
        con1.lastname='raj';
        con1.accountid=acc.id;*/
        
        try
        {
            insert con;
        }
        catch(Exception ex)
        {
            e = ex;
          //  System.assert(e instanceOf System.DMLException);
        //    System.assert(e.getMessage().contains('FIELD_CUSTOM_VALIDATION_EXCEPTION'));
          System.assert(e.getMessage().contains('Record already exist with same email Id'));
          //  System.assert(false);
             
        }
      }

 

 

Thanks in Advance

  • September 28, 2013
  • Like
  • 0

HI ,

can any one help,

 

This is my Apex code

public with sharing class debitnoteemail
{
public final Debit_Note__c debit;
String[] toAddresses = new String[]{};
public debitnoteemail()
{
debit=[select id,Contact__c,Contact_Email__c from Debit_Note__c where id=:ApexPages.currentPage().getParameters().get('id')];
}

public Debit_Note__c getdebitnote()
{
return debit;
}
public string getemail


public PageReference sendemail()
{
PageReference ref=page.DemandNotePdf;
ref.getParameters().put('id',debit.id);
Blob body;
try
{
body=ref.getContent();
}
catch(VisualforceException e)
{
System.debug('Error');
}
Messaging.EmailFileAttachment Att=new Messaging.EmailFileAttachment();
Att.setFileName('DebitNote' + debit.Contact__c + '.pdf');
Att.setBody(body);
string val=email;
Messaging.SingleEmailMessage mail =new Messaging.SingleEmailMessage();
mail.setToAddresses(new String[]{val});
mail.setSubject('PDF Email Demo');
mail.setHtmlBody('Here is the email you requested! Check the attachment!');
mail.setFileAttachments(new Messaging.EmailFileAttachment[] { att });

Messaging.sendEmail(new Messaging.SingleEmailMessage[]{mail});
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Email with PDF sent to '+val));


return null;
}
}

 

 

this is my test class:

 

@istest
public class senddebitnote
{
public static void debitnoteemail()
{


account acc=new account();
acc.name='test account';
acc.email__c='jabaraj.jaba@gmail.com';
insert acc;

Debit_Note__c deb=new Debit_Note__c();
deb.Account__c=acc.id;
deb.Contact_Email__c=acc.email__c;error: //Field is not writeable: Debit_Note__c.Contact_Email__c at line 13 column 9
insert deb;

PageReference ref=page.senddebitnote;
ref.getParameters().put('id',deb.id);
debitnoteemail da=new debitnoteemail();

test.starttest();

da.debit.id=deb.id;
// da.debit.Contact_Email__c=acc.email__c;
ref=da.sendemail();
test.stoptest();
}

}

 

 

 

 

 

 

  • September 16, 2013
  • Like
  • 0

public with sharing class debitnoteemail
{
public final Debit_Note__c debit;
String[] toAddresses = new String[]{};
public debitnoteemail()
{
debit=[select id,Contact__c,Contact_Email__c from Debit_Note__c where id=:ApexPages.currentPage().getParameters().get('id')];
}

public Debit_Note__c getdebitnote()
{
return debit;
}
public string getemail


public PageReference sendemail()
{
PageReference ref=page.DemandNotePdf;
ref.getParameters().put('id',debit.id);
Blob body;
try
{
body=ref.getContent();
}
catch(VisualforceException e)
{
System.debug('Error');
}
Messaging.EmailFileAttachment Att=new Messaging.EmailFileAttachment();
Att.setFileName('DebitNote' + debit.Contact__c + '.pdf');
Att.setBody(body);
string val=email;
Messaging.SingleEmailMessage mail =new Messaging.SingleEmailMessage();
mail.setToAddresses(new String[]{val});
mail.setSubject('PDF Email Demo');
mail.setHtmlBody('Here is the email you requested! Check the attachment!');
mail.setFileAttachments(new Messaging.EmailFileAttachment[] { att });

Messaging.sendEmail(new Messaging.SingleEmailMessage[]{mail});
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Email with PDF sent to '+val));


return null;
}
}

  • September 16, 2013
  • Like
  • 0

Hi,

 

I am Migrating Goldmine To Salesforce,But its easy to export Contact And Account, But Exporting The History Related To Contact  its possiable or Not.

 

My Requirement Is ,

 

1.Migrate Account and Contact From Goldmine to Salesforce With History Data,Attachment and Notes.

2.Is It Possiable Using Any Tool?

 

 

Any Help ITS URGENT

 

 

 

Thanks In Advance

  • September 13, 2013
  • Like
  • 0

HI,

I am trying to perform duplicate check for phone number field in account but i am getting following error..

 

trigger Duplicatecheck on Account (before insert,before update)
{
    
    map<integer,Account> getphone=new map<integer,Account>();
    for(Account acc:trigger.new)
    {
        if(acc.Phone!=null &&(trigger.isinsert || acc.Phone!=trigger.oldmap.get(acc.id).Phone))
        {
            if(getphone.containskey(acc.Phone))//error:Incompatible key type String for MAP<Integer,Account>
            {
                acc.Phone.adderror('A New Lead As Same Email');
            }
        }
        else
        {
            getphone.get(acc.Phone);
        }
        
     }
    
    for(account accc:[select Phone from account where Phone in:getphone.keyset()])
    {
        account newaccount=getphone.get(accc.Phone);
        newaccount.Phone.adderror('Lead Exits With Same email');
    }
    
}

  • August 29, 2013
  • Like
  • 0

Hi,

 

I am trying add page number to the pdf but css is not working.

 

 <apex:page renderas="pdf" showheader="false" applyhtmltag="false">

<head>

 <style type="text/CSS">

 @page {

 size:landscape;

 @bottom-right {

 content: "Page " counter(page) " of " counter(pages);

 }

}
</style>

</head>
</apex:page>

 

  • August 26, 2013
  • Like
  • 0

HI ,

 

I have a task ,when Account  Syage move to Suspect ,

It Should open the Suspect Section,Its working when i give one condition,but once suspect information filled and

when i move the stage to prospect unable to View my Suspect Information,

So what i am doing means i am giveing one more information  when Suspect Information not equal to null it should show the  Suspect Section,

 

But If i give two condition its Redered attribute is not working

 

Any help

 

 

<apex:page standardController="Account" >
  <apex:sectionHeader title="Account Edit"/>  
  <apex:form >
      <apex:pageBlock title="EditAccount">
     <apex:pageMessages />
          <apex:pageBlockButtons >  
             <apex:commandButton value="Save" action="{!save}"/>  
             <apex:commandButton value="Cancel" action="{!cancel}"/>      
           </apex:pageBlockButtons>  
          <apex:actionRegion >
              <apex:pageBlockSection title="DatabaseInformation" collapsible="True" >
                  <apex:inputField value="{!account.owner.name}"/>
                  <apex:inputField value="{!account.Phone}"/>
                  <apex:pageBlockSectionItem >
                      <apex:outputLabel value="Account Stage"/>
                      <apex:outputPanel >
                          <apex:inputField value="{!account.Account_Stages__c}">
                              <apex:actionSupport event="onchange" reRender="out" status="mystatus"/>
                          </apex:inputField>
                          <apex:actionStatus startText="applying value..." id="mystatus"/>
                      </apex:outputPanel>
                  </apex:pageBlockSectionItem>
                </apex:pageBlockSection>
               <apex:pageBlockSection title="Additional Information" >
                   <apex:inputField value="{!account.Type}"/>
                    <apex:inputField value="{!account.Industry_Category__c}"/>
                    <apex:inputField value="{!account.AnnualRevenue}"/>
              </apex:pageBlockSection>
             </apex:actionRegion>
           <apex:outputPanel id="out"  >        
                  <apex:pageBlockSection title="Suspect Information" rendered="{(!account.Account_Stages__c =='Suspect') ||(!Account.phone)!=NULL}"  >  
                         <apex:inputField value="{!account.phone}"/>  
                  </apex:pageBlockSection>  
                     
                  <apex:pageBlockSection title="Prospect Information" rendered="{!account.Account_Stages__c =='Prospect'}"  >  
                         <apex:inputField value="{!account.phone}"/>  
                  </apex:pageBlockSection>  
         
          </apex:outputPanel>  
          </apex:pageBlock>
  </apex:form>
</apex:page>

 

 

Thanks,

jaba

Hi ,


    Question:is it possiable to store LIST<SObject> to LIST<String>.

    bec i am getting following error...

    Illegal assignment from LIST<SObject> to LIST<String>.

 

    Why i am tring to pass LIST<SObject> to LIST<String> bec i have to pass to  equalsIgnoreCase(Its takeing only string )

 

   following is my code

 

any help?

 

public static  List<string> searchMovie(string searchTerm)
        {
            List<string> distinctLastnames  = Database.query('Select   Project_Name__c from Apartments__c where Project_Name__c like \'%' + String.escapeSingleQuotes(searchTerm) + '%\' ORDER BY Project_Name__c LIMIT 3');
            for(string lastname: searchterm){
            Boolean found = false;
            for(Integer i=0; i< distinctLastnames.size(); i++){
            
            if(lastname.equalsIgnoreCase(distinctLastnames[i]))
            { //Check if current lastname has been added yet
            found=true;
            break;
            }
             }
             if(!found)
            distinctLastnames.add(lastname);
             }
                return distinctLastnames;
        }

 

Thanks,

jaba

hi,

 i am getting following error while installing salesforce outlook.screen shot is ,

 

http://filedb.experts-exchange.com/incoming/2012/07_w31/t592930/SalesForceError.jpg

 

my system req is:

window7 Ultimate 32 bit

microsoft outlook 2007

 

any help?

 

thanks,

jaba

 

 

 

HI All,

  I am geting Following error while deploying any help..

 All components failed Version Compatibility Check.Every component in this change set requires the "28.0" or higher platform version. Please select an organization with a platform version of "28.0" or higher.

 
thanks,
jaba

hi all,

 

i am trying to find the second largest value of my child record using trigger but i am getting error ...any help

 

this is my code.

 i am geting following error ...Compile Error: unexpected token: '(' at line 20 column 100

trigger secoundlargest on object2__c (after insert,after update,after undelete)
{
    Map<Id,object1__c> ohh = new Map<Id,object1__c>();
    set<id> ids=new set<id>();
    try
    {
        if(trigger.isinsert||trigger.isupdate||trigger.isundelete)
        {
            for(object2__c oid:trigger.new)
            {
                ids.add(oid.Object1__c);
            }
            Ids.remove(null);
            for(id idss:ids)
            {
                ohh.put(idss,new object1__c(id=idss,grandtotal__c=0));
            }
       
          
             for(object2__c sd:[select name,(SELECT MAX(total__c) FROM object2__c  WHERE total__c < (SELECT       MAX(total__c) FROM object2__c)) from  object2__c WHERE object1__c IN: ids])
      {
            }
            
        }
    }
    catch(Exception e)
    {
         System.debug('### Exception: ' + e.getMessage());
    
    }

}

 

i am missing something ...

 

regard,

jaba

Hi all,

 i am getting an error while deploying apex trigger and apex test class from sandbox to production   ,

 below is my trigger 

 

 

Trigger Autocreatecontactnew on Account (Before UPDATE) 
{
 set<string> st=new set<string>();
 list<Contact> listcon=new list<Contact>();
 list<Enquiry__c> listEnquiry = new list<Enquiry__c>();
 list<Account> listacc=Trigger.new;
 For(Account le:listacc)
 st.add(le.id);
 For(string s:st)
 For(Account newLead:Trigger.new)
    IF(newLead.Rcd_Type_Name__c == 'Prospect')
    IF(newLead.Auto_Create_Contact_Refence__c){
    newLead.Auto_Create_Contact_Refence__c=false;
    
    For(Account MLead:[SELECT id,name,Contact_Name__c,Lead_Source__c,Requirements_Details__c,Products_Interested_In__c,Product_Family__c,Sub_Products_Interested_In__c,Auto_Create_Contact_Refence__c,Email__c,Mobile__c,Department__c,Designation__c,Phone FROM Account Where id=:s])
   {
    listcon.add(new Contact(
    Phone=MLead.phone,
    Department=MLead.department__c,
    Designation__c=MLead.designation__c,
    LastName=Mlead.Contact_Name__c,
    Accountid=MLead.id,
    Email=Mlead.Email__c,
    MobilePhone=Mlead.Mobile__c
   ));
  listEnquiry.add(new Enquiry__c (
   
   Name=MLead.name+'-'+MLead.Products_Interested_In__c,
   Account__c=MLead.id,
   Product_Category_Description__c=MLead.Requirements_Details__c,
   Products_Interested_In__c=MLead.Products_Interested_In__c,
   Product_Family__c=MLead.Product_Family__c,
   Sub_Products_Interested_In__c=MLead.Sub_Products_Interested_In__c,
   Lead_Source__c=MLead.Lead_Source__c
 ));
}
Insert Listcon; 
Insert listEnquiry;
}
}

 

 

 

i am geting following error any help

 

API Name
Type
Line
Column
Problem

updateversionnumberTest.null() Class     Failure Message: "line 12, column 5: Field is not writeable: synthesis_Quote__c.Name", Failure Stack Trace: "null" ViewSurveyController.null() Class     Failure Message: "line -1, column -1: Previous load of class failed: updateversionnumbertest", Failure Stack Trace: "null" wrapcls2.null() Class     Failure Message: "line -1, column -1: Previous load of class failed: updateversionnumbertest", Failure Stack Trace: "null" wrapcls2Test.null() Class     Failure Message: "line -1, column -1: Previous load of class failed: updateversionnumbertest", Failure Stack Trace: "null" Autocreatecontactnew       Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required updateduedateontask       Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required updateversionnumber       Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required AutocreateShippingaddress       Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required Deploy Error      

Average test coverage across all Apex Classes and Triggers is 0%, at least 75% test coverage is required.

 

 

 

 

 

Thank,

hamshu...

trigger on opportunity to delete product record of opportunity in salesforce

 

Please tell me how to do this

after create permission set , when try to assign user , it asking create new users ,,  but i want to assigne exiting user , what i do ?

 

ple tell me if u know /..............thank u 

 

Hi Guys,

 

 I want to create a pdf of my vf page ,

 

 we can create like this way

 

pdfPage = page.product_delivery;//new PageReference('/apex/product_delivery1');
pdfPage.getParameters().put('id',oppid);
pdfPage.setRedirect(false);
Blob b=pdfPage.getContentAsPDF();

 

In my vf i am displaying some records with checkbox. When i click on Selected Button , It is displaying Selected Records.

 

I want to Create PDF for Selected Records only.

 

But it is Generating PDF for my intial VF page.. 

 

 

please suggest me..

 

 

 

prem

HI,

 

Any One Came accross like this

 

trigger DuplicateLead on lead (before insert,before update)
{
 
         Set<string> lastname= new Set<string>();
   
      
        for(lead lead : Trigger.new)
         {
             string getjoin=lead .firstname+' '+lead .lastname;
              system.debug(getjoin);output=Sam Kumar
             lastname.add(getjoin );
             system.debug(getjoin);OutPUT:{Sam Kumar} Why ? And How to remove this
         }

}

 

Thanks,

Jaba

  • November 19, 2013
  • Like
  • 0

Hi 

 

My issue is my Descriptive field is getting updated from a trigger in this format

Descriptive ID

Graphic Designer-International-General-Regular-0.75
 

Required format 

 

Descriptive ID  G-I-G-R-0.75

 

Please modify this code

 

descString = '';
descString += posToUpdate.Name != NULL ? posToUpdate.Name : '' ;
descString += dbPosition.VanaHCM__Position_Title__c != NULL ? '-'+dbPosition.VanaHCM__Position_Title__c: '' ;
descString += dbPosition.Hire_Type__c != NULL ? '-'+dbPosition.Hire_Type__c: '' ;
descString += posToUpdate.Funding_Type__c != NULL ? '-'+posToUpdate.Funding_Type__c: '' ;
descString += posToUpdate.Funding_Status__c != NULL ? '-'+posToUpdate.Funding_Status__c: '' ;
descString += posToUpdate.Position_FTE__c != NULL ? '-'+posToUpdate.Position_FTE__c: '' ;
if(descString.startsWith('-') && descString.length() >0){
descString = descString.substring(1);
}
posToUpdate.Descriptive_ID__c = descString;

  • October 23, 2013
  • Like
  • 0

HI ,

can any one help,

 

This is my Apex code

public with sharing class debitnoteemail
{
public final Debit_Note__c debit;
String[] toAddresses = new String[]{};
public debitnoteemail()
{
debit=[select id,Contact__c,Contact_Email__c from Debit_Note__c where id=:ApexPages.currentPage().getParameters().get('id')];
}

public Debit_Note__c getdebitnote()
{
return debit;
}
public string getemail


public PageReference sendemail()
{
PageReference ref=page.DemandNotePdf;
ref.getParameters().put('id',debit.id);
Blob body;
try
{
body=ref.getContent();
}
catch(VisualforceException e)
{
System.debug('Error');
}
Messaging.EmailFileAttachment Att=new Messaging.EmailFileAttachment();
Att.setFileName('DebitNote' + debit.Contact__c + '.pdf');
Att.setBody(body);
string val=email;
Messaging.SingleEmailMessage mail =new Messaging.SingleEmailMessage();
mail.setToAddresses(new String[]{val});
mail.setSubject('PDF Email Demo');
mail.setHtmlBody('Here is the email you requested! Check the attachment!');
mail.setFileAttachments(new Messaging.EmailFileAttachment[] { att });

Messaging.sendEmail(new Messaging.SingleEmailMessage[]{mail});
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Email with PDF sent to '+val));


return null;
}
}

 

 

this is my test class:

 

@istest
public class senddebitnote
{
public static void debitnoteemail()
{


account acc=new account();
acc.name='test account';
acc.email__c='jabaraj.jaba@gmail.com';
insert acc;

Debit_Note__c deb=new Debit_Note__c();
deb.Account__c=acc.id;
deb.Contact_Email__c=acc.email__c;error: //Field is not writeable: Debit_Note__c.Contact_Email__c at line 13 column 9
insert deb;

PageReference ref=page.senddebitnote;
ref.getParameters().put('id',deb.id);
debitnoteemail da=new debitnoteemail();

test.starttest();

da.debit.id=deb.id;
// da.debit.Contact_Email__c=acc.email__c;
ref=da.sendemail();
test.stoptest();
}

}

 

 

 

 

 

 

  • September 16, 2013
  • Like
  • 0

HI ,

 

I have a task ,when Account  Syage move to Suspect ,

It Should open the Suspect Section,Its working when i give one condition,but once suspect information filled and

when i move the stage to prospect unable to View my Suspect Information,

So what i am doing means i am giveing one more information  when Suspect Information not equal to null it should show the  Suspect Section,

 

But If i give two condition its Redered attribute is not working

 

Any help

 

 

<apex:page standardController="Account" >
  <apex:sectionHeader title="Account Edit"/>  
  <apex:form >
      <apex:pageBlock title="EditAccount">
     <apex:pageMessages />
          <apex:pageBlockButtons >  
             <apex:commandButton value="Save" action="{!save}"/>  
             <apex:commandButton value="Cancel" action="{!cancel}"/>      
           </apex:pageBlockButtons>  
          <apex:actionRegion >
              <apex:pageBlockSection title="DatabaseInformation" collapsible="True" >
                  <apex:inputField value="{!account.owner.name}"/>
                  <apex:inputField value="{!account.Phone}"/>
                  <apex:pageBlockSectionItem >
                      <apex:outputLabel value="Account Stage"/>
                      <apex:outputPanel >
                          <apex:inputField value="{!account.Account_Stages__c}">
                              <apex:actionSupport event="onchange" reRender="out" status="mystatus"/>
                          </apex:inputField>
                          <apex:actionStatus startText="applying value..." id="mystatus"/>
                      </apex:outputPanel>
                  </apex:pageBlockSectionItem>
                </apex:pageBlockSection>
               <apex:pageBlockSection title="Additional Information" >
                   <apex:inputField value="{!account.Type}"/>
                    <apex:inputField value="{!account.Industry_Category__c}"/>
                    <apex:inputField value="{!account.AnnualRevenue}"/>
              </apex:pageBlockSection>
             </apex:actionRegion>
           <apex:outputPanel id="out"  >        
                  <apex:pageBlockSection title="Suspect Information" rendered="{(!account.Account_Stages__c =='Suspect') ||(!Account.phone)!=NULL}"  >  
                         <apex:inputField value="{!account.phone}"/>  
                  </apex:pageBlockSection>  
                     
                  <apex:pageBlockSection title="Prospect Information" rendered="{!account.Account_Stages__c =='Prospect'}"  >  
                         <apex:inputField value="{!account.phone}"/>  
                  </apex:pageBlockSection>  
         
          </apex:outputPanel>  
          </apex:pageBlock>
  </apex:form>
</apex:page>

 

 

Thanks,

jaba

Hi ,


    Question:is it possiable to store LIST<SObject> to LIST<String>.

    bec i am getting following error...

    Illegal assignment from LIST<SObject> to LIST<String>.

 

    Why i am tring to pass LIST<SObject> to LIST<String> bec i have to pass to  equalsIgnoreCase(Its takeing only string )

 

   following is my code

 

any help?

 

public static  List<string> searchMovie(string searchTerm)
        {
            List<string> distinctLastnames  = Database.query('Select   Project_Name__c from Apartments__c where Project_Name__c like \'%' + String.escapeSingleQuotes(searchTerm) + '%\' ORDER BY Project_Name__c LIMIT 3');
            for(string lastname: searchterm){
            Boolean found = false;
            for(Integer i=0; i< distinctLastnames.size(); i++){
            
            if(lastname.equalsIgnoreCase(distinctLastnames[i]))
            { //Check if current lastname has been added yet
            found=true;
            break;
            }
             }
             if(!found)
            distinctLastnames.add(lastname);
             }
                return distinctLastnames;
        }

 

Thanks,

jaba

HI All,

  I am geting Following error while deploying any help..

 All components failed Version Compatibility Check.Every component in this change set requires the "28.0" or higher platform version. Please select an organization with a platform version of "28.0" or higher.

 
thanks,
jaba

Hello -

 

I am trying to add a visualforce page to my custom object that will show the related products.

 

So my "Sales Checklist" object is housed on the opportunity, sales fills all the information out then the object is sent to a queue.

 

But to save time i want to pull in the opportunityLineItems in to the sales checklist?

 

Is this possable? I know very little visualforce.

 

This is as far as I have gotten:

 

<apex:page StandardController="Sales_Checklist__c">
<apex:relatedList list="Opportunity__r" />

<apex:pageBlock title="{!Sales_Checklist__c.Opportunity__r.Name}"/>

  <apex:dataTable value="{!Sales_Checklist__c.Opportunity__r}" var="opp" cellPadding="4" border="1">
                
           <apex:column ><apex:facet name="header">Product Name</apex:facet></apex:column>
                
                
           <apex:column><apex:facet name="header">Quantity</apex:facet></apex:column>
                
                
           <apex:column ><apex:facet name="header">Unit Price</apex:facet></apex:column>
                
              
           <apex:column ><apex:facet name="header">Total Price</apex:facet></apex:column>
  </apex:dataTable>
</apex:page>

 

 

any help would be greatlt appriciated

 

Thanks,

Niki

Trying to standardize our greeting in all of our Email Templates used in responses, and we want to simply have a custom function that when added to an email template will look like:

 

Hi,

Thank you for contacting us.

 The challenge with using the BR() tag is that it actually inserts as:

 

Hi,<br>Thank you for contacting us.<br>

 Which obviously won't render properly in a text email.

 

I've tried adding in \r\n, \n, just adding a carriage return in my formula, but can't seem to get any of that to work. Also tried the following, but no luck.

("Hi," & '\n' & "Thank you for contacting us." & '\n')

 

Any thoughts?

 

 

 

 

The following code in other people's development environment is right,but   in my development environment is wrong.Why?

 

  public List<SelectOption> getItems() {
          List<SelectOption> options = new List<SelectOption>();
          options.add(new SelectOption('US','US'));
          options.add(new SelectOption('CANADA','Canada'));
          options.add(new SelectOption('MEXICO','Mexico'));
          return options;
   }

 error:Constructor not defined: [selectOption].<Constructor>(String, String)

 

  

in addition:

  PageReference acctPage = new ApexPages.StandardController(account).view();

error:Illegal assignment from System.PageReference to pageReference

 

what is the difference between  System.PageReference  and pageReference?

 

I have a Picklist called Status in my junction object visualforce page, it contains three values. I need to display to the values in another visualforce page in a table and i also need to add additional values to the picklist, how do i do it plz help me...
  • December 10, 2008
  • Like
  • 0