• Dominic Sebastian 7
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 5
    Questions
  • 3
    Replies
I had created the following code but it seems to not work for the Hover
 
<apex:page standardController="Account" extensions="HoverActivityHistory1">
<apex:pageBlock title="Activity History List">
<apex:pageBlockTable value="{!Taskvalues}" var="acc">
<apex:column headerValue="{!$ObjectType.Task.Fields.Subject.Label}">
<a href="/{!acc.id}"
id="lookup{!acc.id}opp4"
onblur="LookupHoverDetail.getHover('lookup{!acc.id}opp4').hide();"
onfocus="LookupHoverDetail.getHover('lookup{!acc.id}opp4', '/{!acc.id}/m?retURL=/{!acc.id}&isAjaxRequest=1').show();"
onmouseout="LookupHoverDetail.getHover('lookup{!acc.id}opp4').hide();"
onmouseover="LookupHoverDetail.getHover('lookup{!acc.id}opp4', '/{!acc.id}/m?retURL=/{!acc.id}&isAjaxRequest=1').show();">
{!acc.Subject}
</a>
</apex:column>
<apex:column headerValue="{!$ObjectType.Task.Fields.Description.Label}" value="{!acc.Description}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
And the Apex Class
 
public class HoverActivityHistory1{

   public static List<Account> accounts; 

   public static List<Task> acc;

    public HoverActivityHistory1(ApexPages.StandardController controller) {
     acc = [select Id, WhatId, Subject, Description from Task where WhatId =: ApexPages.currentPage().getParameters().get('id')  ];

    }

    public static List<Task> getTaskvalues(){


    return acc;
    }




}

I get the output as follows.
User-added image
 
I have created a Visualfroce page that would direct to the Lead with activites reports as it will display the Description field of the open activies. I have a Professional Edition of Salesfroce. Hence No workflows. 

I have used  apex:iframes to the visualforce page and added as a related list on the lead page. Somehow its directing me to another page. I would like it to be displayed on the same page.

Is there a work around with this.
Is there a way to create a custom Gameficcation for leads and Opportunities in Salesforce ?
Is there a way to Keep track of Lead conversion to Opportunities?.

1.If there is a way to track the "Convert " button of Leads  and capture the amount of clicks on the button and store it, with the user who created the opportunity.

2. all the data from point 1, is shown in the Home Page using the Home Page Component ?.

Is there a way to do that ?
 
 Is there a way to hide the recycle bin from the home page component tab?. For the 2015 edition of salesforce as the HTML area for the javascript code is not working

<script>

 var sfdcOnload = self.onload;

 self.onload = function() {

      if (sfdcOnload) sfdcOnload();

      // - hide copyright

     var elements = getElementsByClassName('bPageFooter noTableFooter');
    if (elements.length>0) {
        elements[0].innerHTML = "Your own copyright battle cry";
        elements[0].style.display = 'none'; // or this if you just don't want to see it
    }

 }

</script> 
 
 Is there a way to hide the recycle bin from the home page component tab?. For the 2015 edition of salesforce as the HTML area for the javascript code is not working

<script>

 var sfdcOnload = self.onload;

 self.onload = function() {

      if (sfdcOnload) sfdcOnload();

      // - hide copyright

     var elements = getElementsByClassName('bPageFooter noTableFooter');
    if (elements.length>0) {
        elements[0].innerHTML = "Your own copyright battle cry";
        elements[0].style.display = 'none'; // or this if you just don't want to see it
    }

 }

</script> 
 
 Ihave created workflow rules to assign leads to a Particular Owner's queue on lead creation. So, after the lead is created it will be assigned to the owner's queue. Now I have written a custom Lead Convert VisualForce page. But when I click on Convert button, it gives error:-

 ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Converted objects can only be owned by users. If the lead is not owned by a user, you must specify a user for the Owner field.: []
Error is in expression '{!ConvertLead}' in component <apex:commandButton> in page customleadconvert

This error comes as the lead is still assigned to the queue and conversion requires the lead to be assigned to owner. How can I automate the assignment back to User A if the lead is assigned to A's queue when my custom VF page loads? My VF Page is given below:
<apex:page standardController="Lead" extensions="LeadConvertController">
    <apex:includescript value="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" />
     <apex:sectionHeader title="Convert {!$ObjectType.Lead.label}" subtitle="{!Lead.name}"/>
    <apex:form >
        <apex:pageBlock mode="edit" >
       
        <apex:pageblockbuttons >
                <apex:commandbutton value="Convert" action="{!ConvertLead}"/>
                <apex:commandbutton value="Cancel" action="{!Cancel}"/>
        </apex:pageblockbuttons>
        
        <apex:pageblocksection id="LeadConvertPBS" title="Convert Lead">
         <apex:pageBlockSectionItem >
            <apex:outputLabel value=" Record Owner" for="Record Owner"/>
            <apex:inputField value="{!Lead.OwnerID}" id="recOwner"/>
          </apex:pageBlockSectionItem>
          <apex:pageBlockSectionItem >
            <apex:outputLabel for="Account Name">Account Name</apex:outputLabel>
             <apex:inputField required="true" id="company" value="{!Lead.Company}" />
          </apex:pageBlockSectionItem>
          <apex:pageBlockSectionItem >
           <apex:OutputLabel for="Send Email to the Owner">Send Email to the Owner</apex:OutputLabel>
           <apex:inputCheckbox onclick="{!Lead.Ownerid}"/>
           </apex:pageBlockSectionItem> 
          <apex:pageBlockSectionItem >
            <apex:outputLabel for="Oppt Name">Opportunity Name:</apex:outputLabel>
             <apex:inputField required="true" id="Owner" value="{!Lead.Company}" />
          </apex:pageBlockSectionItem>
          <apex:pageBlockSectionItem >
                      <apex:outputLabel for="ConStatus">Converted Status:</apex:outputLabel>
             <apex:inputField id="ConStatus" value="{!Lead.Status}" />
          </apex:pageBlockSectionItem>
          <apex:pageblockSectionItem >
              <apex:outputLabel for="no oppty">Do not create new opportunity upon conversion</apex:outputLabel>
               <apex:inputCheckbox id="noOppty"/>
               
          </apex:pageblockSectionItem>
        </apex:pageblocksection> 
  <apex:pageblocksection id="BookingPBS" title="Booking Details">
         <apex:pageblockSectionItem >
                <apex:outputLabel for="BookingStart">Booking Start Date/Time</apex:outputLabel>
         <apex:inputField id="BookingStart" value="{!lead.Booking_Start_Date_Time__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="BookingEnd">Booking End Date/Time</apex:outputLabel>
         <apex:inputField id="BookingEnd" value="{!lead.Booking_End_Date_Time__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="BookingOwner">Booking Owner</apex:outputLabel>
         <apex:inputField id="BookingOwner" value="{!lead.Booking_Owner__c}"/>
            </apex:pageblockSectionItem>
            </apex:pageblocksection>
            <apex:pageblocksection id="ServicePBS" title="Service Type">
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceFree30Min">Free 30 Minute Assessment</apex:outputLabel>
                <apex:inputCheckbox id="ServiceFree30Min" value="{!lead.Free_30_Minute_Assessment__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServicePutterFitting">Putter Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServicePutterFitting" value="{!lead.Putter_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceWedgeFitting">Wedge Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServiceWedgeFitting" value="{!lead.Wedge_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceIronFitting">Iron Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServiceIronFitting" value="{!lead.Iron_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceDriverFitting">Driver Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServiceDriverFitting" value="{!lead.Driver_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceWoodsHybridFitting">Woods + Hybrid Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServiceWoodsHybridFitting" value="{!lead.Woods_Hybrid_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceTrackmanGolfLesson">Trackman Golf Lesson</apex:outputLabel>
                <apex:inputCheckbox id="ServiceTrackmanGolfLesson" value="{!lead.Trackman_Golf_Lesson__c}"/>
            </apex:pageblockSectionItem>
        </apex:pageblocksection>
        </apex:pageBlock>
        
    </apex:form> 

</apex:page>

 
 Ihave created workflow rules to assign leads to a Particular Owner's queue on lead creation. So, after the lead is created it will be assigned to the owner's queue. Now I have written a custom Lead Convert VisualForce page. But when I click on Convert button, it gives error:-

 ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Converted objects can only be owned by users. If the lead is not owned by a user, you must specify a user for the Owner field.: []
Error is in expression '{!ConvertLead}' in component <apex:commandButton> in page customleadconvert

This error comes as the lead is still assigned to the queue and conversion requires the lead to be assigned to owner. How can I automate the assignment back to User A if the lead is assigned to A's queue when my custom VF page loads? My VF Page is given below:
<apex:page standardController="Lead" extensions="LeadConvertController">
    <apex:includescript value="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" />
     <apex:sectionHeader title="Convert {!$ObjectType.Lead.label}" subtitle="{!Lead.name}"/>
    <apex:form >
        <apex:pageBlock mode="edit" >
       
        <apex:pageblockbuttons >
                <apex:commandbutton value="Convert" action="{!ConvertLead}"/>
                <apex:commandbutton value="Cancel" action="{!Cancel}"/>
        </apex:pageblockbuttons>
        
        <apex:pageblocksection id="LeadConvertPBS" title="Convert Lead">
         <apex:pageBlockSectionItem >
            <apex:outputLabel value=" Record Owner" for="Record Owner"/>
            <apex:inputField value="{!Lead.OwnerID}" id="recOwner"/>
          </apex:pageBlockSectionItem>
          <apex:pageBlockSectionItem >
            <apex:outputLabel for="Account Name">Account Name</apex:outputLabel>
             <apex:inputField required="true" id="company" value="{!Lead.Company}" />
          </apex:pageBlockSectionItem>
          <apex:pageBlockSectionItem >
           <apex:OutputLabel for="Send Email to the Owner">Send Email to the Owner</apex:OutputLabel>
           <apex:inputCheckbox onclick="{!Lead.Ownerid}"/>
           </apex:pageBlockSectionItem> 
          <apex:pageBlockSectionItem >
            <apex:outputLabel for="Oppt Name">Opportunity Name:</apex:outputLabel>
             <apex:inputField required="true" id="Owner" value="{!Lead.Company}" />
          </apex:pageBlockSectionItem>
          <apex:pageBlockSectionItem >
                      <apex:outputLabel for="ConStatus">Converted Status:</apex:outputLabel>
             <apex:inputField id="ConStatus" value="{!Lead.Status}" />
          </apex:pageBlockSectionItem>
          <apex:pageblockSectionItem >
              <apex:outputLabel for="no oppty">Do not create new opportunity upon conversion</apex:outputLabel>
               <apex:inputCheckbox id="noOppty"/>
               
          </apex:pageblockSectionItem>
        </apex:pageblocksection> 
  <apex:pageblocksection id="BookingPBS" title="Booking Details">
         <apex:pageblockSectionItem >
                <apex:outputLabel for="BookingStart">Booking Start Date/Time</apex:outputLabel>
         <apex:inputField id="BookingStart" value="{!lead.Booking_Start_Date_Time__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="BookingEnd">Booking End Date/Time</apex:outputLabel>
         <apex:inputField id="BookingEnd" value="{!lead.Booking_End_Date_Time__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="BookingOwner">Booking Owner</apex:outputLabel>
         <apex:inputField id="BookingOwner" value="{!lead.Booking_Owner__c}"/>
            </apex:pageblockSectionItem>
            </apex:pageblocksection>
            <apex:pageblocksection id="ServicePBS" title="Service Type">
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceFree30Min">Free 30 Minute Assessment</apex:outputLabel>
                <apex:inputCheckbox id="ServiceFree30Min" value="{!lead.Free_30_Minute_Assessment__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServicePutterFitting">Putter Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServicePutterFitting" value="{!lead.Putter_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceWedgeFitting">Wedge Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServiceWedgeFitting" value="{!lead.Wedge_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceIronFitting">Iron Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServiceIronFitting" value="{!lead.Iron_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceDriverFitting">Driver Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServiceDriverFitting" value="{!lead.Driver_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceWoodsHybridFitting">Woods + Hybrid Fitting</apex:outputLabel>
                <apex:inputCheckbox id="ServiceWoodsHybridFitting" value="{!lead.Woods_Hybrid_Fitting__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputLabel for="ServiceTrackmanGolfLesson">Trackman Golf Lesson</apex:outputLabel>
                <apex:inputCheckbox id="ServiceTrackmanGolfLesson" value="{!lead.Trackman_Golf_Lesson__c}"/>
            </apex:pageblockSectionItem>
        </apex:pageblocksection>
        </apex:pageBlock>
        
    </apex:form> 

</apex:page>