• AndyPandy
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 36
    Replies

Hi All,

 

I am trying to set-up a time based workflow, which sends an email alert to a Custom Object record owner, at specificed intervals.

 

The Custom Object has a field called "End Date" - I need to set-up a reminder email to be sent:

 

- 1 Year before the "End Date"

- 9 Months before the "End Date"

- 6 Months before the "End Date" and

- 3 Months before the "End Date"

 

So far, I have created a Workflow Rule which Evaluates when a Custom Object record is created.  The criteron for this is just that the required field "Name", is not equal blank, i.e. it will always fire upon record creation.

 

It then has 4 Time-Dependent Workflow actions (each one being an Email Alert) associated with it, the crierion for each is:

 

1) 365 days before "End Date"

2) 270 days before "End Date"

3) 180 days before "End Date"

4) 90 days before "End Date"

 

The issues I'm having though are:

 

A)  If I create a record where the End Date is in, for example, 100 days, Time Dependent Workflow actions 1), 2) and 3) (as per above), all fire at once, therefore 3 reminder emails are sent.  I only want it so one email is sent, not all of them.

 

B)  If the End Date changes on a record, the email alerts won't get sent out as per the updated End Date information, because I have my Workflow rule set-up to evaluate only when a record is created.  However, if I choose to evaluate it "When a record is created, or edited to meet criteria", I don't know what criteria I would use to ensure the workflow rule triggers, based on a change in the End Date.

 

Has anyone come across this issue before - is there a way in which I can get this to work, ideally without the need for APEX, as I cannot code.

 

Many thanks,

 

Andy

 

 

Hi All,

 

I posted a question in the General board a while back, asking how to add together multiple roll-up summary fields, using standard functionality, Link = http://boards.developerforce.com/t5/General-Development/Add-Together-Multiple-Roll-Up-Summary-Fields/m-p/491781#M74789

 

However, after no response, I checked with SFDC Support, who said the only available method was to use an APEX Trigger.

 

Being completely new to APEX, I have come here to ask if someone could provide some help/tips on where to go to learn how to do this specific task.

 

I have the SObject "Account" in the Org I admin, as well as two new Custom Objects called "Business Plan" and "Capital Pipeline".

 

Each User in my Org is the owner of multiple Accounts, and each Account has multiple "Capital Pipeline" deals.

 

I have created a number of Roll-Up Summary fields on the Account SObject, which roll-up the sum of the "Capital Pipeline" deal values.

 

I now need to roll-up the Account roll-ups for each User in the Org, so I get an overall sum of "Capital Pipeline" deal values for all the Accounts owned by each User.

 

Is this something which is possible via a Trigger?

 

For example:

 

User A owns Account 1, Account 2 and Account 3.

 

Account 1 has two Capital Pipeline deals, worth a total of £125,000

Account 2 has four Capital Pipeline deals, worth a total of £275,000

Account 3 has three Capital Pipeline deals, worth a total of £100,000

 

Each Account would have their own Roll-Up Summary field showing the totals as above.

 

I need my Business Plan record for User A, to show a "Total Deal Value" of £500,000 (the total of all the "Capital Pipeline" deals related to the Accounts they own).

 

Each user would have their own Business Plan record, and when they accessed it, the "Total Deal Value" would have to be correct for them.

 

Any help would be HUGELY appreciated.

 

Thanks,

 

Andy

Hi All,

 

I've found myself stuck in a bit of a problematic situation.

 

I'm the Admin of our Salesforce Org and I have been asked to create a new "Business Plan" Custom Object.

 

Already existing in our Org are the SObjects "Accounts" and "Opportunities" as well as a Custom Object "Capital Pipeline" (which is for new sales deals).

 

"Capital Pipeline" is the detail in a Master-Detail relationship with "Accounts".  I have created Roll-Up Summary fields on the "Account" SObject, which create SUMs for the value of the Capital Pipeline deals.

 

For the Business Plan, I need to be able to, dynamically, display the SUM of the all Roll-Up Summary fields against each Account owned by the Business Plan owner.

 

For example:

 

User A owns Account 1, Account 2 and Account 3.

 

Account 1 has two Capital Pipeline deals, worth a total of £125,000

Account 2 has four Capital Pipeline deals, worth a total of £275,000

Account 3 has three Capital Pipeline deals, worth a total of £100,000

 

Each Account would have their own Roll-Up Summary field showing the totals as above.

 

I need my Business Plan record for User A, to show a "Total Deal Value" of £500,000 (the total of all the deals related to the Accounts they own).

 

Each user would have their own Business Plan record, and when they accessed it, the "Total Deal Value" would have to be correct for them.

 

Is this at all possible?  Any help would be HUGELY appreciated.

 

Many thanks,

 

Andy

Hi All,

 

I created a Custom Object - "Capital Pipeline" recently for our Production Org.

 

This has been live for approximately 2 months, and so far we have in excess of 300 records created.

 

Now, rather annoyingly, management have asked me to alter the Custom Object, so it's split into two different Record Types (Cameras and Other Capital).

 

This is fine, and can be done without a problem; however, I want to know what can be done with the existing records, which won't have any record type affiliated with them:

 

- Can I assign one of the record types to the existing records?

- If so, can this be done via Data Loader?

- Does it matter if the existing records are not affiliated with a record type?

 

Ideally I would like all records to have a record type, as that will ensure there is consistency and everything will be captured in the same way from a reporting/dashboard etc perspective.

 

Any help/advice on this would be greatly appreciated.

 

Many thanks,

 

Andy

Hi All,

 

I'm looking to find a method of giving a user the ability, if they wish, to create two, separate, Custom Object records in one process.

 

It will always start with them creating a new Custom Object record called "Capital Pipeline"; however, rather than just having the Standard "Save", "Cancel" etc buttons visible in the Edit mode of this inital Custom Object record, I would also like for there to be a button allowing the user to "Save and Book a DEMO".

 

If the user were to select the button "Save and Book a DEMO", it would both save the record they are creating, then take them to the Edit page of a new record on a separate Custom Obect, "Rentals".  Additionally, if possible, the button could also find a way of auto-populating a couple of the cross-over fields in the new "Rental" record, for example "Surgeon", as this field appears on the Page Layouts for both of the Custom Objects (Capital Pipeline and Rentals).

 

Is this something which is possible, and is a Custom Button the best method of doing this?

 

Many thanks indeed,

 

Andy

Hi All,

 

Slightly dramatic subject, but my issue seems ridiculous.

 

I have created a very basic Text Email Template, to use in conjunction with a Workflow Rule.  Everything works perfectly, with the exception of the formatting of the last 4 rows of the Email.

 

See Email Template Body below:

 

Dear Rental Team,

Please find details of a new Rental booking from {!Rentals__c.CreatedBy}:

Link to booking form:  {!Rentals__c.Link}

Hospital:  {!Rentals__c.Hospital__c}
Surgeon:  {!Rentals__c.Surgeon__c}
PO Number:  {!Rentals__c.PO_Number__c}

Arrival Date:  {!Rentals__c.Arrival_Date__c}
Delivery Time:  {!Rentals__c.Delivery_Time__c}
Delivery Department:  {!Rentals__c.Delivery_Department__c}
Collection Date:  {!Rentals__c.Collection_Date__c}
Contact Person:  {!Rentals__c.Contact_Person__c}
Contact Telephone No.:  {!Rentals__c.Contact_Telephone_No__c}

Tray 1:  {!Rentals__c.Tray_1_Quantity__c} x {!Rentals__c.Tray_1__c}
Tray 2:  {!Rentals__c.Tray_2_Quantity__c} x {!Rentals__c.Tray_2__c}
Tray 3:  {!Rentals__c.Tray_3_Quantity__c} x {!Rentals__c.Tray_3__c}
Tray 4:  {!Rentals__c.Tray_4_Quantity__c} x {!Rentals__c.Tray_4__c}

When I format it like this, the last 4 rows, in the email received (Outlook 2010), appear as one line, e.g.:

 

Tray 1:  2 x Kit A Tray 2:  1 x Kit B Tray 3:  1 x Kit C Tray 4:  2 x Kit D

 

Which does not appear to make sense.  However, as it was doing this, I adjusted the Email Body (just the last 4 rows), to look like the following:

 

Tray 1:  {!Rentals__c.Tray_1_Quantity__c} x {!Rentals__c.Tray_1__c}

Tray 2:  {!Rentals__c.Tray_2_Quantity__c} x {!Rentals__c.Tray_2__c}

Tray 3:  {!Rentals__c.Tray_3_Quantity__c} x {!Rentals__c.Tray_3__c}

Tray 4:  {!Rentals__c.Tray_4_Quantity__c} x {!Rentals__c.Tray_4__c}

This however, formats the email on separate rows, but with a blank row in between (i.e. double-spaced), e.g.:

 

Tray 1:  2 x Kit A

 

Tray 2:  1 x Kit B

 

Tray 3:  1 x Kit C

 

Tray 4:  2 x Kit D

 

Can anyone help me to format this as I would like, with each Tray shown on a separate row, but with no blank row in between, e.g.:

 

Tray 1:  2 x Kit A

Tray 2:  1 x Kit B

Tray 3:  1 x Kit C

Tray 4:  2 x Kit D

 

What am I doing wrong?

 

Many thanks,

 

Andy

Hi All,

 

I have created a Custom Object within my Org, and I would like to have a Custom Button which, depending on the User's Role, will take them to one of three Report Folders, to view a selection of reports related to this Object.

 

I have used the following foruma, which saves without a problem, and when you check the Syntax returns no errors:

 

if ( 
{!$UserRole.Name} = "Central TM" || "Eastern TM" || "Ireland TM" || "Northern TM" || "South Central TM" || "South East TM" || "South West TM", 

"https://emea.salesforce.com/00l20000001nVUx", 

if ( 

{!$UserRole.Name} = "Central RBM" || "Eastern RBM" || "Ireland RBM" || "Northern RBM" || "South Central RBM" || "South East RBM" || "South West RBM", 

"https://emea.salesforce.com/00l20000001nVUs", 

"https://emea.salesforce.com/00l20000001nVV2" 

))

However, whenever I test the code it does not work - it comes back with an error message:

 

"URL No Longer Exists"

 

Moreover, if I copy+paste any one of the 3 URLs I have used in the above formula, it takes me to exactly the right place, so I know that the URLs are fine.

 

Can anyone let me know what is going wrong please?

 

Additionally (just a by-the-by if anyone can help), I can only seem to show this custom button within one of the List Views (which has to be selected after a user has navigated to my Custom Object tab) - is there any way for the button to be visible as soon as a user clicks on the Custom Object tab, without them having to select a List View first?

 

Thank you for any help you can provide,

 

Andy

Hi All,

 

I'm a fairly confident Admin of my SFDC Org, with regards standard functionality, but completely new to coding, APEX and Visualforce (having made only a couple of very simple VF Pages, and no Custom Triggers).

 

However, I have recently put together a new Custom Object, which allows our users to create Deals (very much like the standard Opportunities object - but we needed a Custom version - don't ask...).

 

We need to tweak this slightly - so that it works a bit like this:

 

- User selects the "Deals" tab from within SFDC Org

 

- They press the standard "New" button, to create a new deal

 

- They then have to choose one of two Record Types ("Cameras" or "Other")

 

- If they choose Other - then it opens a standard Page Layout, with the Custom Fields created in relation to the Custom Object, which allows them to save a record using the standard "Save" button - all completely standard and generic, no problem.

 

- If they choose Cameras - then I need something a bit different to happen; firstly, I will still need a very similar standard Page Layout to the "Other" option as above, but with a few different fields, but instead of having the normal "Save" button at the bottom of the page, I want this page to be step 1 of 3, and there to be a button called "Next" at the bottom.

 

- Once they've hit "Next", it takes them to a booking form (another page layout), which allows the user to select from a range of DEMO equipment, which they wish to order. Once they've entered the details of the equipment they want, there is another "Next" button to get to step 3.  However, as this DEMO equipment is optional, I also want a button available which says "Skip This Step" - which takes them to Step 3 without completing a Booking Form.

 

- Step 3 will then just be a "Save" button to complete the process.

 

I am absolutely fine with doing everything up to the "Steps" process of the Cameras record type option - which is where I have no idea if that is possible.

 

Also - just to add ALL the information, if someone does choose Cameras and fills in a DEMO equipment booking form in Step 2 - I would like a Workflow to email the details of that record to another user - who will then process the DEMO equipment order.

 

Can anyone let me know if this is possible at all, and if so point me in the direction of where I can get help (and perhaps what the technical name for this process type thing I am trying to achieve is called, so I can do some more research) - I have tried a number of search terms, but have not yet found what I need...

 

Thank you very much indeed (and please let me know if I can provide any further details to help!).

 

Thanks again,

 

Andy

Hi All,

 

I am attempting to create a new text based Email Template, which includes a selection of Checkbox Fields - and all I want to do is have the email show, for each field, whether the value is "Yes" or "No".  After some searching I discovered that you could create some formulas directly into the merge fields template, so I have created the following:

 

Dear (Person We Will Send This To),

Please find below the full list of courses related to {!Account.Salutation} {!Account.FirstName} {!Account.LastName}:

Advanced Meniscal Course (1 Day): {!if(Surgeon_Education__c.Advanced_Meniscal_Course_1_Day__c,"Yes","No")}
Advanced Meniscal Course (2 Days): {!if(Surgeon_Education__c.Advanced_Meniscal_Course_2_Days__c,"Yes","No")}
Anatomic ACL & Cruciate Course: {!if(Surgeon_Education__c.Anatomic_ACL_Cruciate_Course__c,"Yes","No")}

 

However, where I have my formulae stating to display "Yes" or "No" - absolutely nothing is displayed for the checkbox value, it's just blank.  I have tried re-jigging the formulae, and also just adding the merge fields on their own without being part of a formula, but still no luck - I just get blanks, no idea why.  And I know for certain that some of the fields are ticked in the record, and some are not, so there should be something showing (and besides, everything should be either "Yes" or "No" - nothing should be blank).

 

Could anyone help to enlighten me - we're really hoping to get this up and running ASAP.

 

Cheers,

 

Andy

 

Hi All,

 

I have (with a great deal of help from this forum) managed to put together a VF Page which renders a custom object record as a PDF - excellent start.

 

All the PDF displays, is a pretty basic form of all the fields from the record - so we can then email the PDF to people.

 

Some of these custom object fields, however, are Checkboxes, and on my PDFs the values for said Checkboxes display as "true" or "false" depending on what was input - which I completely agree makes sense.

 

However, the people I am making this PDF form for do not think all lower-case "true" or "false" look very pretty - so have requested that I amend this to read "Yes" for true and "No" for false.

 

At the moment, the only way I can think of doing this is to create a custom object formula field for each Checkbox I have, which is an IF statement to display either "Yes" or "No" - but with a LOT of checkboxes on the form this would be incredibly time consuming - and I would have thought there must be some form of VisualForce jiggery-pokery which could change the appearance of checkbox values on the VF Page - can anyone help?

 

Quick snippet of the code for the page as follows:

 

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

<html>

<head>
<style>
@page{
margin:0.25in;
}
.Label{
font-weight:bold;
font-size:10px;
font-family:"arial" "sans-serif";
}
.Output{
font-weight:regular;
font-size:10px;
font-family:Arial Unicode MS;
}
.colStyle{
width:25%;
}
</style>
</head>

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

   <apex:PanelGrid columnClasses="colStyle" columns="4" border="1" frame="box" rules="all" width="100%" cellpadding="1px">
<apex:outputlabel styleClass="Label" value="Person Reporting Incident"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Person_Reporting_Incident__c}"/>
<apex:outputlabel styleClass="Label" value="Incident ID"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Name}"/>
   </apex:PanelGrid>

<apex:outputText style="font-style:bold; font-weight:bold; font-size:2px; font-family:sans-serif; color:white" value="."/> <p></p>
<apex:outputText style="font-style:bold; font-weight:bold; font-size:14px; font-family:sans-serif" value="Facility Information"/> 
   
   <apex:PanelGrid columnClasses="colStyle" columns="4" border="1" frame="box" width="100%" cellpadding="1px">
<apex:outputlabel styleClass="Label" value="Hospital Name"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Hospital_Name__c}"/>
<apex:outputlabel styleClass="Label" value="Street Address"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Street_Address__c}"/>
<apex:outputlabel styleClass="Label" value="Account Number"/>

 

Any help would be greatly appreciated.  Many thanks,

 

Andy

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 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.  However, as you'll see from the below VF Page code, it is very crude, and looks awful (totally basic plain Times New Roman, in two columns all bunched up):

 

<apex:page renderAs="pdf" StandardController="Adverse_Incident__c">
  <apex:PageBlock >
    <apex:PageBlockSection columns="2">
	<apex:outputText value="{!Adverse_Incident__c.Batch_Number__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Brand_Name_of_Generator__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Burn_Location__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Burn_Severity__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.City__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Complaint_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Country__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Did_a_burn_occur__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Did_any_piece_break_off_inside_the_body__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Electro_Surgical_Device__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.E_Mail_Address__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Estimated_Delay_to_the_Case__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Evaluate_Repair_Device__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Evaluate_Return_Device__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Evaluate_Only_Do_Not_Return__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Fluid_Management_System__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.For_Intelijet_Systems_Type_of_Cannula__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.For_Intelijet_Systems_Type_of_Scope__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Hospital_Name__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Incident_Date__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Incident_Description__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Issue_a_Credit__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Is_the_device_under_warranty__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Pad_Location__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Pad_Manufacturer__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Patient_Age__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Patient_Bone_Quality__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Patient_Sex__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Person_Reporting_Incident__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Phone_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Please_explain_the_answer_above__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Post_Code__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Procedure__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Product_Code__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Return_Authorisation_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Return_the_device_for_evaluation__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.S_N_Organisation__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_City__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_Country__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_E_Mail_Address__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_Phone_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_Post_Code__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_Street_Address__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.SAP_Service_Notification_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Service_Replacement_if_applicable__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Software_Version_of_Generator__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Street_Address__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Surgeon_Name__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Was_a_back_up_device_available__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Was_the_piece_removed__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Was_there_a_patient_injury__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Was_this_an_Out_of_Box_Failure__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.What_was_the_state_of_the_flush_valve__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.When_was_the_problem_noted__c}"/>
    </apex:PageBlockSection>
  </apex:PageBlock>
</apex:page>

 Could someone help me with how I would go about styling this page, to make it look a bit more professional - basically changing the font, creating sections (which can literally just be bigger bolder text, then the above outputText values being on the row below) - and generally making it look like a nice printable view record of the form, which can then be emailed as an attachment, or saved to a record etc, looking half decent?

 

ANY help would be greatly appreciated as I am very new indeed to all of this.

 

Many thanks,

 

Andy

Hi Guys,

 

I hope I am not committing a forum faux pas by doing this - but this issue has arisen as a result of another post I created recently, which has gone cold: Render as PDF via VF Page

 

I have an APEX Class, which I am using in connection with a VF Page, on which I just want to display fields from a custom object in a nice "printable form".

 

In the above linked post, I got a reply which explained that I could "select" fields in my Class which I wanted to display on the VF Page, as per below example, where the Batch_number__C is selected:

 

public class Adverse_Incident {
public Adverse_Incident__c aIn{get;set;}
public Adverse_Incident ()
   {
       aIn=new Adverse_Incident__c();
       aIn=[select Batch_number__c from Adverse_Incident limit 1];
   }
}

However, there are a LOT of fields in my custom object, and I'm sure there must be a way to "select" all the fields without having to do each one individually - so was hoping someone could help.

 

Then, once they are ALL selected in my APEX class, I could then select them all individually for my VF Page.

 

I hope this makes sense and that someone can help!

 

Many thanks,

 

Andy

Hi All,

 

I am using an iPhone 4 with Salesforce Mobile (the full edition).

 

I have created a Custom Object called "Price List" (we opted out of the sObject option SFDC offers).

 

My Custom Object has successfully been added to my Mobile Data Set, and is appearing without any issues on the iPhone App.

 

However, whenever a user utilises the Search facility on the App (to search through our 10,000 or so Products), the only field visible in the Search Results page layout, is Record Name (which for us is Product Code).  As the majority of people using this are more familiar with descriptions - it would be great for the Search Results layout to be able to be a two-field layout (as per Custom Mobile Page Layouts) - that way I can add the Description field.

 

I have searched everywhere, but cannot find any method of doing this (I have changed all the "Search Layouts" layouts available in the Admin set-up for this Custom objects, but nothing has worked) - can anyone help me to determine how I can change this Search Results layout - if it is indeed possible?

 

Many thanks,

 

Andy

Hi All,

 

I'm very new to VF Pages and coding in general - but am keen to learn, and have researched this query a lot, but as yet I haven't found an explanation I can understand and follow.

 

Basically, I have created a custom object (EDIT: called "Adverse Incident") and I am attempting to (end goal) have a button on the record page of the new object which will render that record as a pdf.

 

As I understand it, this must be done via a VF Page - and I am already stuck.  Reading around I have managed to create the following start (very early stages):

 

<apex:page renderAs="pdf" Controller="Adverse_Incident">
<apex:panelGrid columns="2" width="100%">
<apex:outputText value="{ !Account__r.Name }"> </apex:outputText>
<apex:outputText value="{ !Product_Code__c }"> </apex:outputText>
<apex:outputText value="{ !Batch_Number__c }"> </apex:outputText>
<apex:outputText value="{ !Surgeon__r.Name }"> </apex:outputText>
</apex:panelgrid>
</apex:page>

 Doing this, Salesforce automatically created the following Class for me:

 

public with sharing class Adverse_Incident {
}

 However, when I access the new page, it just displays the actual text "!Account__r.Name", "!Product_Code__c" etc... (not the content of the fields, as inputted by users).

 

Can someone point me in the right direction and explain where I'm going wrong please - so I can start to better understand how it works - which should enable me to progress on the VF Page, and start to introduce proper formatting etc.

 

As much step-by-step information as possible would be greatly appreciated - and please let me know if you need more information from me.

 

Many thanks,

 

Andy

Hi All,

 

I'm pretty new to Salesforce and definitely a complete nube when it comes to all things coding; but I'm willing to listen and learn (just putting it out there).

 

I'm the Admin for our SFDC Org, and all our users perform the overwhelming majority of their SFDC activity on the Salesforce Mobile iPhone App, whilst out and about.

 

One of the things I have been asked to check into and attempt to implement, is providing a pop-up reminder box for users after logging a call against an Account, to be asked if they want to update an open Opportunity related to that Account, provided there is an open Opportunity.  (This is just one example, if this is possible we may well want more of these).  The pop-up would, ideally, appear much like a text message or a Calendar reminder does on an iPhone; that is to say, on screen, on top of the current window, in it's own "bubble".

 

I've searched extensively, and found out that it appears you can have pop-up messages (as per this SFDC Link: http://www.salesforce.com/crm/sales-force-automation/mobile-crm/), and also I understand there are such pop-up reminders as "Toasters", but I think that is something different.

 

Could anyone help me out and let me know if what I'm trying to achieve is possible?

 

Please let me know if any further clarification is required.

 

Many thanks,

 

Andy

Hi All,

 

I’ve been playing around with Page Layouts, but it appears, despite which option I choose for any section within a page layout, that the mobile version of the page layout, always reads with a “tab-key order” of left-right.

 

For example – I have a two column section on an Account Page Layout, which, on the laptop, has a “Tab-Key order” of Top-Down – which looks like:

 

Column 1 | Column 2

Email 1     | Phone 1

Email 2     | Phone 2

Email 3     | Phone 3

 

However, on the phone, that equates to the following, regardless of whether I chose a “tab key order” of Top-Down or Left-Right:

 

Email 1

Phone 1

Email 2

Phone 2

Email 3

Phone 3

 

But what I want is:

 

Email 1

Email 2

Email 3

Phone 1

Phone 2

Phone 3

 

Is there any way of preserving the laptop page layout format, and also having it appear as I want in the mobile?

 

Many thanks,

 

Andy

Hi All,

 

I have sorted out automating a daily upload of 40+ pdf files in a folder called “Daily Sales” within the SFDC “Documents” standard object; each pdf file is named a particular SFDC $User.ID.

 

e.g. 00920000002QgZe.pdf

 

I am trying to create a “dynamic” VF page, which displays the pdf related to the running user – as their pdf will be called $User.ID.pdf.  So I was hoping there would be a way of the VF Page being (in lay terms, not APEX Code): src=”[Salesforce Documents Folder.ID] \ [$User.ID.pdf]” – where the Folder.ID will be constant, and the $User.ID merge field will create the "dynamic-ness" of the page - basically a dynamic file path.

 

Having tried to play around with it, it seems that "file paths" is not the way in which SFDC works with Documents - so would anyone know if it would be possible for me to create this dynamic page - and if so provide some fairly detailed instructions please (I am a noob with VF).

 

Many thanks indeed,

 

Andy

Hello,

 

I have been creating a process-conf.xml file in order to automatically insert Documents into Salesforce on a daily basis.

 

The .xml file is working fine, however, I had been told that if you insert a Document with the same name as an existing Document in SFDC, then previous version would be overwritten with the new version, which is what I want.  However, this is not happening when I run my .xml file, I am instead getting a selection of Documents with the same name.

 

Is there a way of ensuring that if I upload a Document with the same name as an existing Document (which I regularly will be), the previous version is overwritten with the new one.

 

Any help would be much appreciated.  Cheers,

 

Andy

Hi All,

 

I have searched for this, but without any luck, so apologies if this question has already been asked elsewhere.

 

I have been tasked with making our company's Daily Sales data available on Salesforce, for each Sales Person via Dashboard (to be updated on a daily basis).

 

All our Sales data is not (nor will it be) available within Salesforce; as such I am proposing to get around the problem using the following method:

 

- Generate a Daily pdf Report for each Sales Person (SP)

- Name each pdf with the Salesforce (SFDC) User.ID of each SP

- Upload each pdf to the "Documents" object within SFDC on a daily basis

- Create an APEX page which references the uploaded sales reports; incorporating the SFDC User.ID of each SP - thus creating a Dynamic sales report page

- Use the APEX page to create a Dashboard item

 

I have successfully managed to create a Dashboard item using an APEX page which references a pdf within a local drive, using the same principal as above, however, users off-site users (including all the SPs) cannot access any Network drives off-site; as such it was suggested to try uploading the pdfs to the "Documents" object, and referencing the APEX page from that instead.

 

So what I need to know is whether or not is it possible to automate the upload of multiple files to the "Documents" object on SFDC on a daily basis and if so - how?

 

Please let me know if you need any additional information from me, or clarification on anything.

 

Any help would be much appreciated.

 

Many thanks,

 

AndyP

Hi All,

 

I am attempting to create a new text based Email Template, which includes a selection of Checkbox Fields - and all I want to do is have the email show, for each field, whether the value is "Yes" or "No".  After some searching I discovered that you could create some formulas directly into the merge fields template, so I have created the following:

 

Dear (Person We Will Send This To),

Please find below the full list of courses related to {!Account.Salutation} {!Account.FirstName} {!Account.LastName}:

Advanced Meniscal Course (1 Day): {!if(Surgeon_Education__c.Advanced_Meniscal_Course_1_Day__c,"Yes","No")}
Advanced Meniscal Course (2 Days): {!if(Surgeon_Education__c.Advanced_Meniscal_Course_2_Days__c,"Yes","No")}
Anatomic ACL & Cruciate Course: {!if(Surgeon_Education__c.Anatomic_ACL_Cruciate_Course__c,"Yes","No")}

 

However, where I have my formulae stating to display "Yes" or "No" - absolutely nothing is displayed for the checkbox value, it's just blank.  I have tried re-jigging the formulae, and also just adding the merge fields on their own without being part of a formula, but still no luck - I just get blanks, no idea why.  And I know for certain that some of the fields are ticked in the record, and some are not, so there should be something showing (and besides, everything should be either "Yes" or "No" - nothing should be blank).

 

Could anyone help to enlighten me - we're really hoping to get this up and running ASAP.

 

Cheers,

 

Andy

 

Hi All,

 

I've found myself stuck in a bit of a problematic situation.

 

I'm the Admin of our Salesforce Org and I have been asked to create a new "Business Plan" Custom Object.

 

Already existing in our Org are the SObjects "Accounts" and "Opportunities" as well as a Custom Object "Capital Pipeline" (which is for new sales deals).

 

"Capital Pipeline" is the detail in a Master-Detail relationship with "Accounts".  I have created Roll-Up Summary fields on the "Account" SObject, which create SUMs for the value of the Capital Pipeline deals.

 

For the Business Plan, I need to be able to, dynamically, display the SUM of the all Roll-Up Summary fields against each Account owned by the Business Plan owner.

 

For example:

 

User A owns Account 1, Account 2 and Account 3.

 

Account 1 has two Capital Pipeline deals, worth a total of £125,000

Account 2 has four Capital Pipeline deals, worth a total of £275,000

Account 3 has three Capital Pipeline deals, worth a total of £100,000

 

Each Account would have their own Roll-Up Summary field showing the totals as above.

 

I need my Business Plan record for User A, to show a "Total Deal Value" of £500,000 (the total of all the deals related to the Accounts they own).

 

Each user would have their own Business Plan record, and when they accessed it, the "Total Deal Value" would have to be correct for them.

 

Is this at all possible?  Any help would be HUGELY appreciated.

 

Many thanks,

 

Andy

Hi All,

 

Slightly dramatic subject, but my issue seems ridiculous.

 

I have created a very basic Text Email Template, to use in conjunction with a Workflow Rule.  Everything works perfectly, with the exception of the formatting of the last 4 rows of the Email.

 

See Email Template Body below:

 

Dear Rental Team,

Please find details of a new Rental booking from {!Rentals__c.CreatedBy}:

Link to booking form:  {!Rentals__c.Link}

Hospital:  {!Rentals__c.Hospital__c}
Surgeon:  {!Rentals__c.Surgeon__c}
PO Number:  {!Rentals__c.PO_Number__c}

Arrival Date:  {!Rentals__c.Arrival_Date__c}
Delivery Time:  {!Rentals__c.Delivery_Time__c}
Delivery Department:  {!Rentals__c.Delivery_Department__c}
Collection Date:  {!Rentals__c.Collection_Date__c}
Contact Person:  {!Rentals__c.Contact_Person__c}
Contact Telephone No.:  {!Rentals__c.Contact_Telephone_No__c}

Tray 1:  {!Rentals__c.Tray_1_Quantity__c} x {!Rentals__c.Tray_1__c}
Tray 2:  {!Rentals__c.Tray_2_Quantity__c} x {!Rentals__c.Tray_2__c}
Tray 3:  {!Rentals__c.Tray_3_Quantity__c} x {!Rentals__c.Tray_3__c}
Tray 4:  {!Rentals__c.Tray_4_Quantity__c} x {!Rentals__c.Tray_4__c}

When I format it like this, the last 4 rows, in the email received (Outlook 2010), appear as one line, e.g.:

 

Tray 1:  2 x Kit A Tray 2:  1 x Kit B Tray 3:  1 x Kit C Tray 4:  2 x Kit D

 

Which does not appear to make sense.  However, as it was doing this, I adjusted the Email Body (just the last 4 rows), to look like the following:

 

Tray 1:  {!Rentals__c.Tray_1_Quantity__c} x {!Rentals__c.Tray_1__c}

Tray 2:  {!Rentals__c.Tray_2_Quantity__c} x {!Rentals__c.Tray_2__c}

Tray 3:  {!Rentals__c.Tray_3_Quantity__c} x {!Rentals__c.Tray_3__c}

Tray 4:  {!Rentals__c.Tray_4_Quantity__c} x {!Rentals__c.Tray_4__c}

This however, formats the email on separate rows, but with a blank row in between (i.e. double-spaced), e.g.:

 

Tray 1:  2 x Kit A

 

Tray 2:  1 x Kit B

 

Tray 3:  1 x Kit C

 

Tray 4:  2 x Kit D

 

Can anyone help me to format this as I would like, with each Tray shown on a separate row, but with no blank row in between, e.g.:

 

Tray 1:  2 x Kit A

Tray 2:  1 x Kit B

Tray 3:  1 x Kit C

Tray 4:  2 x Kit D

 

What am I doing wrong?

 

Many thanks,

 

Andy

Hi All,

 

I have created a Custom Object within my Org, and I would like to have a Custom Button which, depending on the User's Role, will take them to one of three Report Folders, to view a selection of reports related to this Object.

 

I have used the following foruma, which saves without a problem, and when you check the Syntax returns no errors:

 

if ( 
{!$UserRole.Name} = "Central TM" || "Eastern TM" || "Ireland TM" || "Northern TM" || "South Central TM" || "South East TM" || "South West TM", 

"https://emea.salesforce.com/00l20000001nVUx", 

if ( 

{!$UserRole.Name} = "Central RBM" || "Eastern RBM" || "Ireland RBM" || "Northern RBM" || "South Central RBM" || "South East RBM" || "South West RBM", 

"https://emea.salesforce.com/00l20000001nVUs", 

"https://emea.salesforce.com/00l20000001nVV2" 

))

However, whenever I test the code it does not work - it comes back with an error message:

 

"URL No Longer Exists"

 

Moreover, if I copy+paste any one of the 3 URLs I have used in the above formula, it takes me to exactly the right place, so I know that the URLs are fine.

 

Can anyone let me know what is going wrong please?

 

Additionally (just a by-the-by if anyone can help), I can only seem to show this custom button within one of the List Views (which has to be selected after a user has navigated to my Custom Object tab) - is there any way for the button to be visible as soon as a user clicks on the Custom Object tab, without them having to select a List View first?

 

Thank you for any help you can provide,

 

Andy

Hi All,

 

I'm a fairly confident Admin of my SFDC Org, with regards standard functionality, but completely new to coding, APEX and Visualforce (having made only a couple of very simple VF Pages, and no Custom Triggers).

 

However, I have recently put together a new Custom Object, which allows our users to create Deals (very much like the standard Opportunities object - but we needed a Custom version - don't ask...).

 

We need to tweak this slightly - so that it works a bit like this:

 

- User selects the "Deals" tab from within SFDC Org

 

- They press the standard "New" button, to create a new deal

 

- They then have to choose one of two Record Types ("Cameras" or "Other")

 

- If they choose Other - then it opens a standard Page Layout, with the Custom Fields created in relation to the Custom Object, which allows them to save a record using the standard "Save" button - all completely standard and generic, no problem.

 

- If they choose Cameras - then I need something a bit different to happen; firstly, I will still need a very similar standard Page Layout to the "Other" option as above, but with a few different fields, but instead of having the normal "Save" button at the bottom of the page, I want this page to be step 1 of 3, and there to be a button called "Next" at the bottom.

 

- Once they've hit "Next", it takes them to a booking form (another page layout), which allows the user to select from a range of DEMO equipment, which they wish to order. Once they've entered the details of the equipment they want, there is another "Next" button to get to step 3.  However, as this DEMO equipment is optional, I also want a button available which says "Skip This Step" - which takes them to Step 3 without completing a Booking Form.

 

- Step 3 will then just be a "Save" button to complete the process.

 

I am absolutely fine with doing everything up to the "Steps" process of the Cameras record type option - which is where I have no idea if that is possible.

 

Also - just to add ALL the information, if someone does choose Cameras and fills in a DEMO equipment booking form in Step 2 - I would like a Workflow to email the details of that record to another user - who will then process the DEMO equipment order.

 

Can anyone let me know if this is possible at all, and if so point me in the direction of where I can get help (and perhaps what the technical name for this process type thing I am trying to achieve is called, so I can do some more research) - I have tried a number of search terms, but have not yet found what I need...

 

Thank you very much indeed (and please let me know if I can provide any further details to help!).

 

Thanks again,

 

Andy

Hi All,

 

I have (with a great deal of help from this forum) managed to put together a VF Page which renders a custom object record as a PDF - excellent start.

 

All the PDF displays, is a pretty basic form of all the fields from the record - so we can then email the PDF to people.

 

Some of these custom object fields, however, are Checkboxes, and on my PDFs the values for said Checkboxes display as "true" or "false" depending on what was input - which I completely agree makes sense.

 

However, the people I am making this PDF form for do not think all lower-case "true" or "false" look very pretty - so have requested that I amend this to read "Yes" for true and "No" for false.

 

At the moment, the only way I can think of doing this is to create a custom object formula field for each Checkbox I have, which is an IF statement to display either "Yes" or "No" - but with a LOT of checkboxes on the form this would be incredibly time consuming - and I would have thought there must be some form of VisualForce jiggery-pokery which could change the appearance of checkbox values on the VF Page - can anyone help?

 

Quick snippet of the code for the page as follows:

 

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

<html>

<head>
<style>
@page{
margin:0.25in;
}
.Label{
font-weight:bold;
font-size:10px;
font-family:"arial" "sans-serif";
}
.Output{
font-weight:regular;
font-size:10px;
font-family:Arial Unicode MS;
}
.colStyle{
width:25%;
}
</style>
</head>

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

   <apex:PanelGrid columnClasses="colStyle" columns="4" border="1" frame="box" rules="all" width="100%" cellpadding="1px">
<apex:outputlabel styleClass="Label" value="Person Reporting Incident"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Person_Reporting_Incident__c}"/>
<apex:outputlabel styleClass="Label" value="Incident ID"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Name}"/>
   </apex:PanelGrid>

<apex:outputText style="font-style:bold; font-weight:bold; font-size:2px; font-family:sans-serif; color:white" value="."/> <p></p>
<apex:outputText style="font-style:bold; font-weight:bold; font-size:14px; font-family:sans-serif" value="Facility Information"/> 
   
   <apex:PanelGrid columnClasses="colStyle" columns="4" border="1" frame="box" width="100%" cellpadding="1px">
<apex:outputlabel styleClass="Label" value="Hospital Name"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Hospital_Name__c}"/>
<apex:outputlabel styleClass="Label" value="Street Address"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Street_Address__c}"/>
<apex:outputlabel styleClass="Label" value="Account Number"/>

 

Any help would be greatly appreciated.  Many thanks,

 

Andy

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 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.  However, as you'll see from the below VF Page code, it is very crude, and looks awful (totally basic plain Times New Roman, in two columns all bunched up):

 

<apex:page renderAs="pdf" StandardController="Adverse_Incident__c">
  <apex:PageBlock >
    <apex:PageBlockSection columns="2">
	<apex:outputText value="{!Adverse_Incident__c.Batch_Number__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Brand_Name_of_Generator__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Burn_Location__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Burn_Severity__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.City__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Complaint_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Country__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Did_a_burn_occur__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Did_any_piece_break_off_inside_the_body__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Electro_Surgical_Device__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.E_Mail_Address__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Estimated_Delay_to_the_Case__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Evaluate_Repair_Device__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Evaluate_Return_Device__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Evaluate_Only_Do_Not_Return__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Fluid_Management_System__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.For_Intelijet_Systems_Type_of_Cannula__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.For_Intelijet_Systems_Type_of_Scope__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Hospital_Name__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Incident_Date__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Incident_Description__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Issue_a_Credit__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Is_the_device_under_warranty__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Pad_Location__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Pad_Manufacturer__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Patient_Age__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Patient_Bone_Quality__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Patient_Sex__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Person_Reporting_Incident__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Phone_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Please_explain_the_answer_above__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Post_Code__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Procedure__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Product_Code__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Return_Authorisation_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Return_the_device_for_evaluation__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.S_N_Organisation__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_City__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_Country__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_E_Mail_Address__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_Phone_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_Post_Code__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Sales_Rep_Street_Address__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.SAP_Service_Notification_No__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Service_Replacement_if_applicable__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Software_Version_of_Generator__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Street_Address__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Surgeon_Name__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Was_a_back_up_device_available__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Was_the_piece_removed__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Was_there_a_patient_injury__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.Was_this_an_Out_of_Box_Failure__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.What_was_the_state_of_the_flush_valve__c}"/>
	<apex:outputText value="{!Adverse_Incident__c.When_was_the_problem_noted__c}"/>
    </apex:PageBlockSection>
  </apex:PageBlock>
</apex:page>

 Could someone help me with how I would go about styling this page, to make it look a bit more professional - basically changing the font, creating sections (which can literally just be bigger bolder text, then the above outputText values being on the row below) - and generally making it look like a nice printable view record of the form, which can then be emailed as an attachment, or saved to a record etc, looking half decent?

 

ANY help would be greatly appreciated as I am very new indeed to all of this.

 

Many thanks,

 

Andy

Guys, I am developing an application that shares a controller between multiple pages.

In first page there is a form that contain multiple buttons.

on first page button one is pressed it calls a method and assign value  to Controller attribute and display that contents in the second page in a input field

 

Seond page contain a button to render same content in PDF format .when button is pressed  it redirects to a another page and display content in pdf format that Works fine !!!!!

 

On the first page there is a another button to directly show the content in PDF format by redirecting direcly to third page but that doesnt work  PDF is render as empty document

 

point to note

  • multiple pages share the same controller
  • content rendered as pdf
  • Same instance of the controller is used to access old value with out reinstantiation  (using PageReference.setredirect(false)  )

process works in two steps but same thing doesnt work in one step

step 1

public PageReference ViewMailInEditMode()

    
    {
        Map<String,String> formValues = new Map<String,String>();
        Id selectedEmp=employeeAssignment.Employee__c;
        String emailTemplate = this.emailTemplate;
        formValues.put('effectiveDate',String.valueOf(employeeAssignment.Effective_Date__c));
        formValues.put('id',selectedEmp);
        formValues.put('templateType',emailTemplate);
        if (emailTemplate.equals('Employee Extension'))
        {
            formValues.put('fromDate',String.valueOf(employeeAssignment.FromPeriod__c));
            formValues.put('toDate' ,String.valueOf(employeeAssignment.ToPeriod__c));
            formValues.put('currentDesignation',desgnationName);
            
        }
        EmailTemplates = new Email_Template__c();
        EmailTemplates.Body__c =EmailManager.CallMethod(formValues);
        PageReference pgRef = new PageReference('/apex/EmpAssignmentPrintview');
        pgRef.setRedirect(false);
        return pgRef;
    }

 

page 2

 

(printview)
  

<apex:page standardController="Employee_Assignment__c" extensions="EmployeeAssisgnmentExtension" id="page">
  
  <apex:pageBlock id="pageBlock1" >  
        <apex:form id="form1">
            <apex:inputField value="{!EmailTemplates.Body__c}"/>
            <apex:commandButton action="{!Save}" value="Print View"/>
        </apex:form>
    </apex:pageBlock> 
 </apex:page>

 step 2


  •  public PageReference Save()
        {
    
            PageReference pgRef = new PageReference('/apex/EmpAssignmentPrintview2');
            pgRef.setRedirect(false);
            return pgRef;
        }

     

    page 3 (printview2)
  • <apex:page standardController="Employee_Assignment__c" extensions="EmployeeAssisgnmentExtension" id="page" renderAs="pdf">
      <!-- Begin Default Content REMOVE THIS -->
      <apex:outputField value="{! EmailTemplates.Body__c}" />
      <!-- End Default Content REMOVE THIS -->
    </apex:page

     above code work fine

  • code that sum up above two steps to one

     public PageReference pdfview()
        {
            Map<String,String> formValues = new Map<String,String>();
            Id selectedEmp=employeeAssignment.Employee__c;
            String emailTemplate = this.emailTemplate;
            formValues.put('effectiveDate',String.valueOf(employeeAssignment.Effective_Date__c));
            formValues.put('id',selectedEmp);
            formValues.put('templateType',emailTemplate);
            if (emailTemplate.equals('Employee Extension'))
            {
                formValues.put('fromDate',String.valueOf(employeeAssignment.FromPeriod__c));
                formValues.put('toDate' ,String.valueOf(employeeAssignment.ToPeriod__c));
                formValues.put('currentDesignation',desgnationName);
                
            }
            
           // System.debug('ssssssssssssssssssssssssss');
            EmailTemplates = new Email_Template__c();
            EmailTemplates.Body__c =EmailManager.CallMethod(formValues);
            System.debug('ssssssssssssssssssssssssss'+ EmailTemplates.Body__c );
           
           PageReference pgRef1 = new PageReference('/apex/EmpAssignmentPrintview2');
           
            pgRef1.setRedirect(false);
           
            return pgRef1;
         } 

     the above code doesnt work 

Any help would be great  !!!!!!!!!!!!!!!!!!!!!

  • November 16, 2011
  • Like
  • 0

Hi Guys,

 

I hope I am not committing a forum faux pas by doing this - but this issue has arisen as a result of another post I created recently, which has gone cold: Render as PDF via VF Page

 

I have an APEX Class, which I am using in connection with a VF Page, on which I just want to display fields from a custom object in a nice "printable form".

 

In the above linked post, I got a reply which explained that I could "select" fields in my Class which I wanted to display on the VF Page, as per below example, where the Batch_number__C is selected:

 

public class Adverse_Incident {
public Adverse_Incident__c aIn{get;set;}
public Adverse_Incident ()
   {
       aIn=new Adverse_Incident__c();
       aIn=[select Batch_number__c from Adverse_Incident limit 1];
   }
}

However, there are a LOT of fields in my custom object, and I'm sure there must be a way to "select" all the fields without having to do each one individually - so was hoping someone could help.

 

Then, once they are ALL selected in my APEX class, I could then select them all individually for my VF Page.

 

I hope this makes sense and that someone can help!

 

Many thanks,

 

Andy

Hi All,

 

I am using an iPhone 4 with Salesforce Mobile (the full edition).

 

I have created a Custom Object called "Price List" (we opted out of the sObject option SFDC offers).

 

My Custom Object has successfully been added to my Mobile Data Set, and is appearing without any issues on the iPhone App.

 

However, whenever a user utilises the Search facility on the App (to search through our 10,000 or so Products), the only field visible in the Search Results page layout, is Record Name (which for us is Product Code).  As the majority of people using this are more familiar with descriptions - it would be great for the Search Results layout to be able to be a two-field layout (as per Custom Mobile Page Layouts) - that way I can add the Description field.

 

I have searched everywhere, but cannot find any method of doing this (I have changed all the "Search Layouts" layouts available in the Admin set-up for this Custom objects, but nothing has worked) - can anyone help me to determine how I can change this Search Results layout - if it is indeed possible?

 

Many thanks,

 

Andy

Hi All,

 

I want to create a custom field whose field label is very long. I do not know how to increase the field label size. I checked custom label. but in the help it says we can access custom label throgh Apex or VisualForce. If anyone has an idea how to have longer field labels please help me. Your help is greatly appreciated.

 

Thank you,

Assh

  • August 02, 2010
  • Like
  • 0