• aka_flo
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 31
    Replies

I am trying to create an email template where a section of the email only appears when a drop-down list has a certain value (e.g. lead source is not website).  See my code below.  Can anyone tell me why my IF statement is not working here as the section is always appearing in the email?

 

<table>
<tr align="left">
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Company Name: </b></font></td>
<td width=35%><font face="Arial" size="2">{!Lead.Company}</font></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Company Website:</b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Website}</font></td>
</tr>
<tr align="left">
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Full Name: </b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.FirstName} {!Lead.LastName}</font></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Title:</b></font></td>
<td width=15%><font face="Arial" size="2" >{!Lead.Title}</font></td>
</tr>
<tr align="left">
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Email: </b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Email}</font></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Phone:</b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Phone}</font></td>
</tr>
<tr align="left">
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Industry Segment:</b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Industry}</font></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Request Date:</b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.CreatedDate}</font></td>
</tr>
<tr align="left">
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Country: </b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Lead_Country__c}</font></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Number of Sites: </b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.of_Sites__c}</font></td>
</tr>
<tr align ="left">
<td></td><td></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Number of Employees:</b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.NumberOfEmployees}</font></td>
</tr>
<tr align="left">
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Topics of Interest: </b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Topics_of_Interest__c}</font></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>How did you hear about us:</b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.How_did_you_hear_about_us__c}</font></td>
</tr>
<tr align="left">
<td colspan=4><font face="Arial" size="2" color="#38ACEC"><b>EHS Compliance Digitization Needs: </b></font><font face="Arial" size="2" >{!Lead.Describe__c}</font></td>
</tr>
<tr>
<br><br>
</tr>
</table>
<br><br>
<apex:outputPanel rendered = "{!IF(Lead.LeadSource != 'Website'),true , false)}">

<table>
<tr align="left">
<td colspan="4"><font face="Arial" size="2" color="blue"><b>For Inquiry from a source other than the Gensuite Website, see Assessment Details below:</b></font></td>
</tr>
<tr align="left">
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Right Size ($500M - $10B): </b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Right_Size_500M_10B__c}</font></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Former User/Referral:</b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Former_User_Referral__c}</font></td>
</tr>
<tr align="left">
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Decision Maker: </b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Decision_Maker__c}</font></td>
<td width=15%><font face="Arial" size="2" color="#38ACEC"><b>Leadership Team Assessment:</b></font></td>
<td width=35%><font face="Arial" size="2" >{!Lead.Leadership_Team_Assessment__c}</font></td>
</tr>
</table>
</apex:outputPanel>

I have an issue in SalesForce, where I added a custom field to a custom object in SalesForce about a month ago.  Then I determined a better strategy and went back to remove the field.  The system allowed me to remove the field; however, I am being haunted by a validation that is attached to that field.  I can't see this validation in the list, so I don't have the option to remove it.

 

Any ideas on what I can do to remove a validation that I can't see?

I can't figure out how to get rid of the space and the line at the top of my Visualforce page.  See the attached screenshot, which shows the extra space that it is taking up that is not at all necessary.

Does anyone have any ideas on how to make it go away?  It would be a great help.  Thanks.
 
<apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" sidebar="false">
<apex:pageBlock >
      <apex:repeat value="{!opportunities}" var="opp"> 
         <apex:outputPanel rendered="{!IF(opp.Status__c == 'Subscriber',true,false)}" >
        {!opp.Name},
        </apex:outputPanel>
       </apex:repeat>
       </apex:pageBlock>
</apex:page>

I have created the above code; however, I have noticed that this is only reviewing the top maybe 20 results from the full opportunities list. Does anyone have any ideas on why this would be happening? If it doesn't evaluate the entire list, then I don't get the results that I want.

 

My company has SalesForce set up, so that we are tracking Accounts, which can have one or more Opportunities associated with them and then adding the pricing/quote information onto the Opportunity (into 2 separate custom objects).  Does anyone have any ideas on how I can create a page that will show the Account information at the top and then a summary of the proposal detail information of each of the opportunity on the same screen? 

 

I was not able to find a way to creating a Visualforce page that would allow me to traverse these objects using the standard controller (we are using the Professional Edition).  I look at the Console, but this only appears to go up the food chain instead of down.  I looked at creating a report, but I can't include the details from more than object at the child level.

 

Any suggestions would be greatly appreciated.  Thanks.

Hi -

 

I am getting the following error message on my visualforce page and not sure I understand what is wrong with my call for WhoID :  There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Contact/Lead ID: id value of incorrect type: 001C000000qyLZqIAM".

 

This is my code.  Any Thoughts?

 

<apex:page standardController="Task" sidebar="true"> 
    <style>
textarea { width:60%; }
</style>
        <apex:form > 
          <apex:pageBlock title="Task Edit" id="thePageBlock" mode="edit"> 
            <apex:pageBlockButtons > 
                    <apex:commandButton value="Save" action="{!save}"/>
                    <apex:commandButton value="Cancel" action="{!cancel}"/>                 
            </apex:pageBlockButtons> 
             <apex:actionRegion > 
                <apex:pageBlockSection title="Task Information" columns="2"> 
                         <apex:inputField value="{!Task.Ownerid}" required="true"/>
                        <apex:inputField value="{!Task.Whatid}" required="true"/>
                        <apex:inputField value="{!Task.subject}" required="true"/>
                        <apex:inputField value="{!Task.Whoid}" />
                        <apex:inputField value="{!Task.Priority}" required="true"/>
                        <apex:inputField value="{!Task.Due_Date__c}" required="true"/> 
                        <apex:inputField value="{!Task.Status}" required="true"/>                    
                  </apex:pageBlockSection>
                 <apex:pageBlockSection title="Details" columns="1"> 
                         <apex:inputField value="{!Task.Task_Plan__c}" required="true"/> 
                        <apex:inputField value="{!Task.Description}" />    
                         <apex:inputField value="{!Task.Duration_of__c}" />                       
                 </apex:pageBlockSection>
                 <apex:pageBlockSection columns="2"> 
                         <apex:inputField value="{!Task.Days_Until_Due__c}" /> 
                        <apex:inputField value="{!Task.Days_Old__c}" />    
                 </apex:pageBlockSection>
                </apex:actionRegion>
           </apex:pageBlock> 
     </apex:form> 
 </apex:page>

 


I have the following page code; however, I am running into an issue, where the mailing input fields below are not being displayed on the page.  Does anyone know the reason for this? Thanks.

 

<apex:page standardController="Contact" sidebar="true">
    <apex:sectionHeader title="Contact Edit" subtitle="{!Contact.name}"/>
        <apex:form >
          <apex:pageBlock title="Contact Edit" id="thePageBlock" mode="edit">
            <apex:pageBlockButtons >
                    <apex:commandButton value="Save" action="{!save}"/>
                    <apex:commandButton value="Cancel" action="{!cancel}"/>                
            </apex:pageBlockButtons>
             <apex:actionRegion >
                <apex:pageBlockSection title="Information" columns="2">
                 <apex:inputField value="{!Contact.FirstName}"/>
                <apex:inputField value="{!Contact.LastName}"/>
                <apex:inputField value="{!Contact.Former_GE_Employee__c}"/>
                <apex:inputField value="{!Contact.Title}"/>

                <apex:inputField value="{!Contact.Contact_for_a__c}">
  <apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/>
                </apex:inputField>
                  </apex:pageBlockSection>

                <apex:actionStatus startText="applying value..." id="status"/>
                              </apex:actionRegion>

                           <apex:pageBlockSection columns="2"
             rendered="{!Contact.Contact_for_a__c == 'Prospect'}">
                 <apex:inputField value="{!Contact.AccountId}"/>
                 </apex:pageblocksection>
                           <apex:pageBlockSection columns="2"
             rendered="{!Contact.Contact_for_a__c == 'Association'}">
                 <apex:inputfield value="{!Contact.Association__c}"/>
                 </apex:pageblocksection>
                 <apex:pageBlockSection columns="2"
             rendered="{!Contact.Contact_for_a__c == 'Competitor'}">
                 <apex:inputfield value="{!Contact.Competitor__c}"/>
                 </apex:pageblocksection>
                 <apex:pageBlockSection columns="2"
             rendered="{!Contact.Contact_for_a__c == 'Consultant'}">
                 <apex:inputfield value="{!Contact.Consultant__c}"/>
                 </apex:pageblocksection>
                  <apex:pageblocksection columns="2">
                <apex:inputField value="{!Contact.Department__c}"/>
                 <apex:inputField value="{!Contact.Main_Point__c}"/>
                <apex:inputField value="{!Contact.Former_GE_Employee__c}"/>
                <apex:inputField value="{!Contact.User_In__c}"/>
                <apex:inputField value="{!Contact.What_was_their_experience_with_the_tools__c}"/>
                <apex:inputField value="{!Contact.No_Longer_with_Company__c}"/>
           </apex:pageblocksection>
           <apex:pageBlockSection title="Phone & Address Details" columns="2">
                 <apex:inputField value="{!Contact.Email}"/>
                 <apex:inputField value="{!Contact.MailingStreet}"/>
                <apex:inputField value="{!Contact.Phone}"/>
            <apex:inputField value="{!Contact.MailingCity}"/>
                <apex:inputField value="{!Contact.MobilePhone}"/>
                 <apex:inputField value="{!Contact.MailingState}"/>
                <apex:inputField value="{!Contact.HomePhone}"/>
            <apex:inputField value="{!Contact.MailingPostalCode}"/>
</apex:pageblockSEction>
<apex:pageblocksection title="Additional Information" columns="2">
<apex:inputField value="{!Contact.Description}"/>

</apex:pageblocksection>
                         </apex:pageBlock>
     </apex:form>

Hi Guys,

 

I have created a VF Page, which is linked to a button called "Generate PDF", which renders a record of a Custom Object as a PDF.

 

I'm using the PanelGrid feature for my page, as this PDF should appear like a nice, clear form - which can then be saved or emailed etc.

 

However, I'm struggling with a couple of issues:

 

1 - I'm specifying the font as Helvetica - but it is still coming through as Times New Roman

 

2 - I would like there to be a space (blank line/carriage return/line break - whatever the correct terminology is) under the section headings (which I've made via a standard outputtext created outside of a PanelGrid) - but nothing I've tried seems to work

 

3 - I would like for the Column widths for each of the PanelGrids to be the same, that is, not each column must be of equal width, but all the first columns should be the same as each other, all of the second columns should be the same, etc - for all four columns, see e.g. below:

 

Panel Grid 1

Col A | Col B | Col C | Col D

 

Panel Grid 2

Col A | Col B | Col C | Col D

 

Panel Grid 3

Col A | Col B | Col C | Col D

 

So what I would want would be for all the Col A's to be the same width, all the Col B's to be the same etc...

 

See entire VF Page code below:

 

(Any help would be greatly appreciated).  Many thanks, Andy.

 

 

<apex:page renderAs="pdf" StandardController="Adverse_Incident__c">

<style>
   .colstyle {width:25%}
</style>

<apex:outputText style="font-style:bold; font-weight:bold; font-size:20px; font-family:Helvetica" value="Incident Information"/>

  <apex:PanelGrid columns="4" border="2" frame="box" width="100%" columnClasses="colstyle" >
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Person Reporting Incident"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Person_Reporting_Incident__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Incident ID"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Name}"/>
  </apex:PanelGrid>
 
<apex:outputLabel style="font-style:bold; font-weight:bold; font-size:20px; font-family:Helvetica" value="Facility Information"/>
   
   <apex:PanelGrid columns="4" border="2" frame="box" width="100%" columnClasses="colstyle">
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Hospital Name"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Hospital_Name__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="City"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.City__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Account Number"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Account_No__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Street Address"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Street_Address__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Phone No"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Phone_No__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Country"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Country__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="E Mail Address"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.E_Mail_Address__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Post Code"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Post_Code__c}"/>
   </apex:PanelGrid>

<apex:outputLabel style="font-style:bold; font-weight:bold; font-size:20px; font-family:Helvetica" value="Sales Representative Information"/>
   
   <apex:PanelGrid columns="4" border="2" frame="box" width="100%" columnClasses="colstyle">
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="S&N Organisation"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.S_N_Organisation__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep Street Address"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_Street_Address__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep Phone No"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_Phone_No__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep City"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_City__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep E Mail Address"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_E_Mail_Address__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep Country"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_Country__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value=""/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value=""/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep Post Code"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_Post_Code__c}"/>
   </apex:PanelGrid>

 

Hi All,

 

In my application i am using a few standard objects like contacts, products, Reports etc, but in Reports tab it shows all standard object's report. I want to remove/hide those reports like Lead reports, sales reports...etc. Is it possible?

 

Thanks,

Aswath.