• rohitthareja
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

either can we make custom page in the left side for any custom link ?

or can we make menu for many item in custom link so that they look good ?

Please reply  soon .its urgent

 

how to shift a image on a page like . i have an image on left side on the top  then i want to shift it in the down ward direction . please help me :)

Hi,

 

Want the test Class for following Class:

Needs Your help.

 

 

public with sharing class CreateLeadFromContact {
    
    String strConId = ApexPages.currentPage().getParameters().get('id');
    Contact fetchedContact;
    String toRedirectURL = 'https://tapp0.salesforce.com/';
    String getRedirectURL= null;
    
    String toRedirectFinalURL = null;
    String getRedirectFinalURL= null;
    
    String strLeadSource='Inbound Call';
    String getLeadSource=null;
    
    
    public CreateLeadFromContact (ApexPages.StandardController controller) {    }
    
    public PageReference actCreateLeadFromContact() {
        System.debug('Action called for id= '+ strConId );
        
        //Get contact first name, last name, email, company name, phone number, lead source from contact table
        fetchedContact = [SELECT Id, firstName,lastname, Email, company__c, Phone,  AccountId FROM Contact WHERE id=:strConId LIMIT 1];
                         
        PageReference createLeadPage = new PageReference('/00Q/e');
        
        if(fetchedContact.firstName != null && !fetchedContact.firstName.equals(''))
            createLeadPage.getParameters().put('name_firstlea2', fetchedContact.firstName);
        
        if(fetchedContact.lastname != null && !fetchedContact.lastname.equals(''))    
            createLeadPage.getParameters().put('name_lastlea2', fetchedContact.lastname );
            
        if(fetchedContact.Email != null && !fetchedContact.Email.equals(''))
            createLeadPage.getParameters().put('lea11', fetchedContact.Email );
            
        if(fetchedContact.company__c != null && !fetchedContact.company__c.equals(''))
            createLeadPage.getParameters().put('lea3', fetchedContact.company__c );
            
        if(fetchedContact.Phone != null && !fetchedContact.Phone.equals(''))
            createLeadPage.getParameters().put('lea8', fetchedContact.Phone );
                    
        createLeadPage.getParameters().put('nooverride', '1');
        
        createLeadPage.setRedirect(true);
        return createLeadPage;
     
   }
   
   public String getLeadSource(){
   return  strLeadSource;
   
   }
   
     public String getRedirectFinalURL(){
    return  toRedirectFinalURL ;
   
   }
    public String getRedirectURL(){
    return  toRedirectURL ;
   
   }

}

Hi,

 

i want to create a Tip Of Day, i.e. a small pop up window open with data.

How To create this one ??

 

thanks ,- Sheffy

  • January 24, 2011
  • Like
  • 0

Hi,

 

I am not able to understand how can i write a test class for the following trigger that cover minimum coverage area..

 

trigger updatecurrentallocation on RMG_Employee_Allocation__c (after insert,after update)
{
List<RMG_Employee_Master__c> opps = new List<RMG_Employee_Master__c>();
RMG_Employee_Master__c oppty;
List<ID> masterIds = new List<ID>();
Map<ID, String> childDetailMap = new Map<ID, String>();
for(RMG_Employee_Allocation__c c: Trigger.new)
{
 masterIds.add(c.RMG_Employee_Code__c);
 childDetailMap.put(c.RMG_Employee_Code__c, (c.project__c+'-'+c.Manager_Name__c));
}
opps = [select id, Current_Allocation1__c from RMG_Employee_Master__c where id in :masterIds];
for(RMG_Employee_Master__c rem: opps)
{
  if(rem.Current_Allocation1__c != null)
  {
 String[] semiColonSplittedString = rem.Current_Allocation1__c.split(' ;');
 String[] splittedChildVal = childDetailMap.get(rem.id).split('-');
 Boolean flag = false;
 String tempString1 ='';
 String tempString2 = '';
 for(String s: semiColonSplittedString)
{
tempString1 = s;
tempString1 = tempString1.toLowerCase();
tempString2 = splittedChildVal[0].toLowercase();

if(tempString1.contains(tempString2))
{

system.debug('Current Allocation is   :::::::::   '+rem.Current_Allocation1__c);

system.debug('Map value is :::::::::::::::::::  '+childDetailMap.get(rem.id));
rem.Current_Allocation1__c = rem.Current_Allocation1__c.replace(s, childDetailMap.get(rem.id));

system.debug('Current Allocation after replacement   :::::::::   '+rem.Current_Allocation1__c);
flag = true;
system.debug('Flag is    '+flag);


 

}
}

if(!flag)
    rem.Current_Allocation1__c = rem.Current_Allocation1__c + ' ;'+ childDetailMap.get(rem.id);
  }
 else
   rem.Current_Allocation1__c = childDetailMap.get(rem.id);
}
if(opps.size() > 0)
      Update opps;
}

  • January 21, 2011
  • Like
  • 0