• Nichelle Hubley
  • NEWBIE
  • 30 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 7
    Questions
  • 4
    Replies

Hi all,
This might be an easy fix, but I can't figure it out.

I have a web-to-lead form from which I need to use the data on the thank you page. Do you know a way to get the data into the URL as parameters?

The form is here: https://pfpinc.secure.force.com/tii/group_lead

I'm almost successful creating an excel file but I need some help to style two more things:
1) Cell borders - There is a border around the whole table, but I also need each cell to have a border. I tried using this css, which does give the cell borders in the VF page, but not in the excel doc. 
table.details td {
    border: 1px solid black;
      }
2) Cell width - I used a td class to set the width of the column in the VF page but again, the style does not render in the excel file.

Can anyone help with this?

The full page code is here for reference;
<apex:page standardController="Dumping_Grounds__c" >
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />

 <style type="text/css">


  body {
   font-family: Calibri;
   font-size:10pt;
  }

  p {
      font-family: Arial;
      font-size: 10pt;
      }
  table.details {
      border: 1px solid black;
      border-collapse: collapse;
      }

  table.details td {
    font-size:11pt;
    font-family: Calibri;
    border: 1px solid black;
    

  }
  br {
      mso-data-placement:same-cell;
      }
  .head {
      background-color: #C1EEF5;
      text-align: center;
      font-size: 18pt;
      }
  .title {
      font-size: 16pt;
      font-weight: bold;
      }
  .instructions {
      font-size: 16pt;
      font-style: italic;
      color: red;
      }
  .blue {
      background-color: #C1EEF5;
      font-size: 14pt;
      font-style: bold;
      }
      .col1 {
      width: 400px;
      }
      .col2 {
      width: 200px;
      }
</style>

</head>
<body>


       <table >
         <tr >
             <td colspan="2" class="title">DAS Canada - Legal Expense Insurance</td>
         </tr>
         <tr>
             <td colspan="2" class="instructions">Instructions: Please complete and email to underwriting@das.ca</td>
         </tr>
         <tr>
             <td><br/></td>
         </tr>
         </table>

       <table class="details">
           <tr >
               <td colspan="2" class="head">DASbusiness - Application</td>
           </tr>
           <tr>
               <td colspan="2" class="blue">Broker Information</td>
           </tr>
           <tr>
               <td class="col1" >Broker name</td>
               <td class="col2"> Richard Little</td>
           </tr>
           <tr>
               <td>Broker office</td>
               <td>{!Dumping_Grounds__c.Agency__c}</td>
           </tr>
           <tr>
               <td>Broker Contact Tel Number:</td>
               <td>1-855-505-1525 ext 102</td>
           </tr>
           <tr>
               <td>Date this Application Completed:</td>
               <td>{!Dumping_Grounds__c.CreatedDate}</td>
           </tr>
           <tr>
               <td colspan="2" class="blue">Client Details</td>
           </tr>
           <tr>
               <td>Client/Business Name:</td>
               <td>{!Dumping_Grounds__c.Contact_First_Name__c} {!Dumping_Grounds__c.Contact_Last_Name__c}/{!Dumping_Grounds__c.Business_Name__c}</td>
           </tr>
           <tr>
               <td>Client Full Address:</td>
               <td>{!Dumping_Grounds__c.Business_Street__c}, {!Dumping_Grounds__c.Business_City__c}, {!Dumping_Grounds__c.Business_Province__c}, {!Dumping_Grounds__c.Business_Postal_Code__c}, {!Dumping_Grounds__c.Business_Country__c}</td>
           </tr>
           <tr>
               <td>Client Full Business Description:</td>
               <td>{!Dumping_Grounds__c.Client_Full_Business_Description__c}</td>
           </tr>
           <tr>
               <td>Client Annual Payroll:</td>
               <td></td>
           </tr>
           <tr>
               <td>Client Annual Revenue:</td>
               <td></td>
           </tr>
           <tr>
               <td>Client Email Address:</td>
               <td>{!Dumping_Grounds__c.Contact_Email_Address__c}</td>
           </tr>
           <tr>
               <td>Client Phone #:</td>
               <td>{!Dumping_Grounds__c.Contact_Phone_Number__c}</td>
           </tr>
           <tr>
               <td>Policy Subsidiary Companies</td>
               <td><apex:outputText value="{!IF(Dumping_Grounds__c.Number_of_Subsidiary_Accounts__c == '0', 'No', 'Yes')}"/></td>
           </tr>
           <tr>
               <td>Please List all Subsidiary Company Names if applicable:</td>
               <td><apex:outputText rendered="{!IF(Dumping_Grounds__c.Number_of_Subsidiary_Accounts__c = '0', false,true)}">{!Dumping_Grounds__c.Subsidiary_Account_Name1__c} <br/> {!Dumping_Grounds__c.Subsidiary_Account_Name2__c} <br/> {!Dumping_Grounds__c.Subsidiary_Account_Name3__c}</apex:outputText></td>
           </tr>
           <tr>
               <td>Please List all Subsidiary Company Addressses if applicable:</td>
               <td><apex:outputText rendered="{!IF(Dumping_Grounds__c.Number_of_Subsidiary_Accounts__c = '0', false,true)}">{!Dumping_Grounds__c.Subsidiary_Account_Address1__c} <br/> {!Dumping_Grounds__c.Subsidiary_Account_Address2__c} <br/> {!Dumping_Grounds__c.Subsidiary_Account_Address3__c}</apex:outputText></td>
           </tr>
           <tr>
               <td>How should policy be sent?</td>
               <td>Email</td>
           </tr>
           <tr>
               <td>Required Policy Start Date:</td>
               <td>{!Dumping_Grounds__c.Policy_Start_Date__c}</td>
           </tr>
           <tr>
               <td colspan="2">Has this company had two or more legal disputes that could have given rise to a claim under this policy in the past three years? <br/>{!Dumping_Grounds__c.Legal_Claims_Risk__c}</td>
               
           </tr>
           <tr>
               <td colspan="2">Note <br/>{!Dumping_Grounds__c.Legal_Claims_Risk_Explanation__c}</td>
               
           </tr>
           <tr>
               <td colspan="2" class="blue">Total Premium Calculated:</td>
           </tr>
           
       </table>

</body>
</apex:page>


 
I'm using jquery validate plugin to validate a form on a visualforce page. 

Some fields are not rendered, so the code breaks when it gets to those rules. One field (id=select) renders either a set of business fields or personal fields. When the personal field validation code is written first, those fields validate. However, when the business fields validation code is written first, the personal fields do not validate.

For example the code below when the "select" field is set to "personal" the field "personalname1" renders and can be validated. When the field is set to "business" and the field "contactfirstname" renders it is not validated and the form can be submitted without content.

My assessment after some trouble shooting is that when fields aren't rendered, the validation script breaks and no fields further down on the page is validated. 

My question is - how can I validate just the fields that are rendered? 
<script type="text/javascript">
      var j$ = jQuery.noConflict();

        j$(document).on('keydown click change', function() {
        
        j$('[id$=newDGRecord]').validate();  
              
            j$('[id$=select]').rules("add",{
                required: true
            });
            j$('[id$=PersonalName1]').rules("add",{
                required: function() {
                  return j$('[id$=select]').val() == "Personal";
                    }
            });
            j$('[id$=ContactFirstName]').rules("add",{
                required: function() {
                  return j$('[id$=select]').val() == "Business";
                }
            });     
            
           j$('[id$=InsuranceHistory]').rules("add",{
                required: true
            });
            
            j$('[id$= TrueComplete]').rules("add",{
                required: true
            });

            /* Customised the messages */
            jQuery.validator.messages.required = "Please enter a value"; 
        });
        
     </script>


 

Using a force.com site - Is there a way to select the page template using a URL parameter? 

The use case is for partners to send clients to a co-branded page. So what we want to happen is to change the template based on the url. 

I thought about displaying or hiding a logo based on the url parameter, but thought that could become unweildly depending on the number of partners. 

I am open to any other suggestions. Thanks!
 

I don't know if this is the right place to post this but I thought it is worth a shot. I am looking for a solution to do the following steps:
  1. merge custom object fields into a template (currently a word document but could be changed)
  2. render to pdf
  3. attach to record
  4. email to contact
I was hoping to use mail merge to accomplish as least part of this but it doesn't look possible on Mac OS. I also tried using a VF email template with pdf attached but it doesn't allow the option of previewing the pdf attachment before sending.

Any other suggestions to do this within Salesforce?
Hi, 

This is definitely a beginner level question, but I can't find the answer.

In my email I want to display the name of an account, not the ID.

The catch is that the vf email template references a custom object's related object that is AN account (the agency account), but not THE account the the object belongs to. 

Other solutions I found say to use Account.Name but that doesn't work in this case because it isn't the record's account I'm referencing. 

The visualforce code I'm using is: {!relatedTo.Agency2__c} 

I hope that question makes some sense. I'd be grateful for any help you can offer.

​Nichelle
Is there a way to combine some of these cases to shorten the formula? I need to keep adding options, but the formula field has reached the character limit.
IF(ISBLANK(Member_Code__c), 
((CASE(TEXT(Annual_Revenue__c), "Up to $100k", 155, "$100k to $1m", 300, "$1m to $5m", 430, "$5m to $10m", 765, "$10m to $20m", 990, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 85, "2", 170, "3", 255, "4", 340, "5", 425, 0))), 

(CASE(Member_Code__c, 

"bmac2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"exce2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"amrs2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"restocan", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

/*Add new member codes above*/ 
((CASE(TEXT(Annual_Revenue__c), "Up to $100k", 155, "$100k to $1m", 300, "$1m to $5m", 430, "$5m to $10m", 765, "$10m to $20m", 990, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 85, "2", 170, "3", 255, "4", 340, "5", 425, 0))))))

Specifically, is there a way to combine  these conditions, because the output is the same for each conditions
 
(CASE(Member_Code__c, 

"bmac2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"exce2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"amrs2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"restocan", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)),
So, the complete formula would be:

If the field is blank, use the first set of numbers to calculate,
else if the field is bmac2015 or exce2015 or amrs2015 or restocan, use the second set of numbers to calculate,
if the field is full but is not one of those conditions, use the first set of numbers to calculate.

Is there a better way to approach this formula?

The use case is that when the person puts in one of the correct discount codes, the price is calculated accordingly. Right now, there is only one set of discounted pricing. There is the possibility in the future that there would be another set of discounted pricing, so the formula would look like: 

If the field is blank, use the first set of numbers to calculate,
else if the field is bmac2015 or exce2015 or amrs2015 or restocan, use the second set of numbers to calculate,
else if the field is *some other conditions*, use a third set of numbers to calculate
if the field is full but is not one of those conditions, use the first set of numbers to calculate.

I hope someone can point me in the right direction with this. I appreciate any help.

Thanks!
Hi, 

This is definitely a beginner level question, but I can't find the answer.

In my email I want to display the name of an account, not the ID.

The catch is that the vf email template references a custom object's related object that is AN account (the agency account), but not THE account the the object belongs to. 

Other solutions I found say to use Account.Name but that doesn't work in this case because it isn't the record's account I'm referencing. 

The visualforce code I'm using is: {!relatedTo.Agency2__c} 

I hope that question makes some sense. I'd be grateful for any help you can offer.

​Nichelle
Is there a way to combine some of these cases to shorten the formula? I need to keep adding options, but the formula field has reached the character limit.
IF(ISBLANK(Member_Code__c), 
((CASE(TEXT(Annual_Revenue__c), "Up to $100k", 155, "$100k to $1m", 300, "$1m to $5m", 430, "$5m to $10m", 765, "$10m to $20m", 990, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 85, "2", 170, "3", 255, "4", 340, "5", 425, 0))), 

(CASE(Member_Code__c, 

"bmac2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"exce2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"amrs2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"restocan", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

/*Add new member codes above*/ 
((CASE(TEXT(Annual_Revenue__c), "Up to $100k", 155, "$100k to $1m", 300, "$1m to $5m", 430, "$5m to $10m", 765, "$10m to $20m", 990, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 85, "2", 170, "3", 255, "4", 340, "5", 425, 0))))))

Specifically, is there a way to combine  these conditions, because the output is the same for each conditions
 
(CASE(Member_Code__c, 

"bmac2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"exce2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"amrs2015", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)), 

"restocan", (CASE(TEXT(Annual_Revenue__c), "Up to $100k", 90, "$100k to $1m", 170, "$1m to $5m", 235, "$5m to $10m", 420, "$10m to $20m", 545, 0) 
+ 
CASE(TEXT(Number_of_Personal_Policies__c),"1", 65, "2", 130, "3", 195, "4", 260, "5", 325, 0)),
So, the complete formula would be:

If the field is blank, use the first set of numbers to calculate,
else if the field is bmac2015 or exce2015 or amrs2015 or restocan, use the second set of numbers to calculate,
if the field is full but is not one of those conditions, use the first set of numbers to calculate.

Is there a better way to approach this formula?

The use case is that when the person puts in one of the correct discount codes, the price is calculated accordingly. Right now, there is only one set of discounted pricing. There is the possibility in the future that there would be another set of discounted pricing, so the formula would look like: 

If the field is blank, use the first set of numbers to calculate,
else if the field is bmac2015 or exce2015 or amrs2015 or restocan, use the second set of numbers to calculate,
else if the field is *some other conditions*, use a third set of numbers to calculate
if the field is full but is not one of those conditions, use the first set of numbers to calculate.

I hope someone can point me in the right direction with this. I appreciate any help.

Thanks!
Hi all,

I have done an intesive search in the internet and here and I could not find any answer for my question:

is there any way to insert data into salesforce.com from an Adobe PDF Form?

I found many answers for the contrary question (populate a PDF form with salesforce.com data) and also information from Word or Excel files.
It would be very nice to have an idea about it.