• rossco
  • NEWBIE
  • 5 Points
  • Member since 2011

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

Hi

 

I have a simple visualforce page accessed via sites that inserts a lead, and then inserts campaignmember. It works in SF when I'm logged in, but the second insert generates an "insufficient priviledges" error when using sites. We have given the sites profile access as follows and the apex below is below that. Any help would be appreciated. Many thanks

 

 

AccountsRead, Create96Tab HiddenCQS Account Layout
Accounts Data QualityNo Access9--Account Data Quality Layout
Activities----Tab Hidden--
Ad GroupsNo Access8--Ad Group Layout
Answers----Default On--
Articles----Tab Hidden--
Asset RegistersNo Access5Tab HiddenAsset Register Layout
AssetsNo Access34--Licence Layout AS
Business UnitsNo Access5Tab HiddenBusiness Unit Layout
Campaign Calendar----Tab Hidden--
Campaign ColorsRead, Create, Edit12--Campaign Color Layout
Campaign Members--31--Campaign Member Page Layout

 

 

Database.DMLOptions dmo = new Database.DMLOptions();
				dmo.assignmentRuleHeader.useDefaultRule = true;
				lead.setOptions(dmo);
				insert lead;

				CampaignMember mem = new CampaignMember (campaignid=ApexPages.currentPage().getParameters().get('campaignid'), leadid=lead.id);
				insert mem;

 

 

 

  • October 03, 2012
  • Like
  • 0

Hi

 

I have declared visualforcearraylist in my controller and am dynamically adding data to this list. How do I render/display elements from this list in my visualforce page?  I have declared the arraylist as follows:-

 

public List<List<String>> delegates {get;set;}

 Many thanks for all assistance

Regards

Ross

 

Hi 

 

Task - Send an Email

 

Is there is anyway to make a call to the "Task - Send an Email" object/component that is used in Salesforce as above? I know I can use the Apex Email Classes to build up my own message, but I want the complex UI that comes with the built-in one.

 

Thanks

 

  • April 18, 2012
  • Like
  • 0

Hi

 

I have a custom object A that has a lookup to an Opportunity via field B. That opportunity has a custom field called C that is a lookup to Contact.  I now want to put a custom button on object A that passes the value of the contact id (on the opportunity) to an apex page. How do I specify this in the Custom Button URL?

 

Thanks

Ross

 

  • April 17, 2012
  • Like
  • 0

Hi

 

I am calling a VF page from a Custom Button. I have successfully managed to display an alert to the user if certain conditions are met. How can I redirect the user to the original page that had the custom button after this message is displayed? I am displaying the message using the following:-

 

 <script language = "JavaScript">
   var msg = 'There is no valid Contact Record or Contact Role - You may not send an Email until this is done.'
   if ('{!validtoflag}' == 0) {
   	alert (msg);
   }
 </script>

 

 Many thanks

Ross

 

  • April 12, 2012
  • Like
  • 0

Hi

 

How can I right-align my header items in a datatable (as in the code below)

 

       <apex:dataTable value="{!opportunity.opportunitylineitems}" var="line" rowClasses="odd,even"
                columnsWidth="550px, 60px, 100px, 100px, 100px">
                   <td><apex:column width="390px" ><apex:facet name="header">Description</apex:facet><apex:outputField value="{!line.PricebookEntry.name}"/></apex:column>
		           <td><apex:column style="text-align:right" width="60px"><apex:facet name="header" >Quantity</apex:facet> <apex:outputField value="{!line.Quantity}"/></apex:column></td>
		            <apex:column style="text-align:right" width="100px"> <apex:facet name="header" >Initial Fee</apex:facet><apex:outputText value="{0,number,R #,###.00}"> <apex:param value="{!line.UnitPrice}" /> </apex:outputText></apex:column> 
		            <apex:column style="text-align:right" width="100px"> <apex:facet name="header" >Est. Annual Fee</apex:facet><apex:outputText value="{0,number,R #,###.00}"> <apex:param value="{!line.UnitPrice}" /> </apex:outputText></apex:column> 
		            <apex:column style="text-align:right" width="100px" ><apex:facet name="header" >Total Price</apex:facet> <apex:outputText value="{0,number,R #,###.00}"> <apex:param value="{!line.TotalPrice}" /> </apex:outputText></apex:column> 
		        </apex:datatable>

 Many thanks

Ross

 

 

 

 

  • March 27, 2012
  • Like
  • 0
Hi I have a custom object (credit agreement) that has a lookup relationship to the Opportunity. I want to override the New button (for credit agreements) and retrieve values from the parental Opportunity. I have written a VF page that has a standard controller of the creditagreement__c and has extensions but in the extensions class I cannot seem to access the opportunity data. Help ! :) Many thanks to all in advance Ross
  • March 22, 2012
  • Like
  • 0

Hi All

 

Is it possible to add a requirement of the approver to the approval process?  I want to make a certain field mandatory before the approver can approve (this field is not completed by the submitter, but by the approver!).

 

Thanks in advance for all help

 

Ross

 

  • March 07, 2012
  • Like
  • 0

Goodday All

 

I am trying to display in a visualforce page an account's shipping and postal addresses. When Salesforce displays the address in the accounts tab it shows as follows

 

1 Blue Lane

Farhills

Somewhere over the Rainbow

The Moon

2123

 

 

When I display it I get the following:-

 

1 Blue Lane Farhills

 

Somewhere over the Rainbow

The Moon 2123

 

Obviously the first two lines of the address are in one field - but how does SF split it?

 

 

Many thanks

Ross

 

  • March 05, 2012
  • Like
  • 0

Hi All

 

I am trying to access a single aggregate result as in the follows (this is not meant to be  a group of results!)

 

decimal totaldebitorder = [select sum(amount__c) tot from Debit_Order_Transaction__c where Credit_agreement_No__c=:ca.id ].tot;

 

I am getting Invalid field tot for SObject AggregateResult error.

 

Please help?

 

thanks in advance

Ross

 

  • February 23, 2012
  • Like
  • 0

Hi All

 

Is the "Task - Send an Email" visualforce page and underlying code exposed to be resued at all (with it's support for email templates etc etc). 

 

Thanks

Ross

 

  • February 15, 2012
  • Like
  • 0

Goodday

 

 

Is it possible to have a dynamic include statement in a visualforce page (to include another visualforce page) - either with an IF statement,or by specifiying the included page via a variable/parameter?

 

Secondly, is there any way to embed a PDF in a visualforce page ?

 

Many thanks in advance

Ross

  • February 03, 2012
  • Like
  • 0

Goodday

 

How do I create a button on a Visualforce page (not an object) that opens another Visualforce page. I would also like to pass the id parameter that was passed to this visualforcepage page to the next one.

 

Many thanks in advance

Ross

 

  • February 02, 2012
  • Like
  • 0

How does one default (or formularise) the value of a field to the value of another field in a related record?

 

I have a new object A that is a child of Opportunites but is also related to an account and am trying to set the value of A.Account to that of Opportunity.Account

 

Thanks in advance

Ross

 

  • January 26, 2012
  • Like
  • 0

Hi 

 

In a VisualForce page I am trying to access ane  Opportunity's Account Name. I am using the standard controller for Opportunity and using the following

 

 <td width="27%"><u><apex:param value="{!opportunity.account.name}"/></u></td>

 

but I dont get any output whatsoever. Help!?

 

Many thanks

Ross

 

  • January 25, 2012
  • Like
  • 0

Hi

 

Is there any way to customized the organization object? Basically I wish to add some of my own organization wide global data (global varaibles) such as VAT Rate, Interest etc

 

Many thanks in advance

Ross

  • January 24, 2012
  • Like
  • 0

Hi

 

I want to write a trigger (before insert and after update) to set a single field on the Account record which is the concatentation of a field from many child records (from ERP_Account). 

 

For exmaple: if the ACCOUNT record has many ERP_Accounts with the value in field ACCOUNTNO as 'TEST1','TEST2','TEST3' respectively, then I want to set ACCOUNTNOS field in the Account record with the value 'TEST1, TEST2, TEST3,' 

 

Dont know where to start - any help would be greatly appreciated.

 

Thanks

Ross

  • April 15, 2011
  • Like
  • 0

Hi

 

I have a custom (Delgate__C) that has two lookups to the Contact table. When there was only one lookup I accessed the Contact data via the Contact__R object. Now that there are two, how to I reference the second related contact  and how does Salesforce know which one I am referring to?

 

Thanks in advance

Ross

  • March 24, 2011
  • Like
  • 0

Hi

 

I am having difficulty in accessing a parameter passed in a URL from one viuslforce page to another. I have two pages (atrainingconfirmatation and  atrainingfconfirmation2). They both use the same controller. The first one prompts the user to select a company who has delegates on this event. The second print a confirmation form. The first page passes the selected accountid to the second. In the controller, I use the accountid to select all the delegates for the event for the passed accountid but am getting no data. This is the code where the passed parameter is used

 

   public List<CQS_Delegate__c> getdelegates(){
        delegate = [SELECT Contact__c,No_of_Delegates__c,Contact__r.Name,Dietary_Requirement__c,Account__r.Name,Payment_Status__c from CQS_Delegate__c WHERE Event__c =:eventid and Account__c=:accountpassedid];
             return delegate;
    }

 

Page1:

 

<apex:page Controller="TrainingConfirmation" sidebar="false"  showheader="false">
<apex:form >
<apex:pageblock >
<apex:pageBlockSection title="Training Confirmation - Select Company" columns="1">
      <apex:pageblocksectionItem >
                  <apex:selectList value="{!accountId}" size="1" id="accountId">
              <apex:selectOptions value="{!accounts}"/>
          </apex:selectList>
      </apex:pageblocksectionItem>    
                            </apex:pageblocksection>           
  </apex:pageblock>

<apex:commandlink value="Click here to Generate Training Confirmation" action="{!genConfirm}"/>
</apex:form>
</apex:page>


 

Page2:

<apex:page Controller="TrainingConfirmation" renderas="PDF" sidebar="false"  showheader="false">

<html>
<head>
<style>
    body{
        font-family:Verdana, Geneva, sans-serif;
        font-size:12px;
    }
    .H1{
        color:#A3CC03;
        font-size:36px;
    }
    .H2{
        font-size:18px;
    }
    .table-heading1{
        color:#374B60;
        background-color:#CCC;
        font-weight:bold;
        padding:2px;
        font-size:14px;
    }
    .table-heading2{
        color:#374B60;
        background-color:#FFF;
        font-weight:bold;
    }
    .table-text{
        color:#374B60;
        background-color:#FFF;
        font-size:10px;
    }
    
    .table-bottom-line{
        border-top:solid 1px #374B60;
    }
    
    .statutory{
        font-size:10px;
    }
</style>

</head>
    <table width="720px" align="center" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td style="text-align:center">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:center">
                <apex:image value="{!$Resource.CQSLogo}" />
            </td>
        </tr>
        <tr>
            <td style="text-align:center">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:center" class="H1">Training Confirmation</td>
        </tr>
        <tr>
            <td style="text-align:center">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:center">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:center" class="H2">Course: {!event.name}</td>
        </tr>
        <tr>
          <td style="text-align:center">Course Date: <apex:outputText value="{0,date, dd MMM yyyy}">
                                <apex:param value="{!event.Start_Date__c}"/>
                            </apex:outputText> 
                            </td>
</tr>
        <tr>
                                <td style="text-align:center">&nbsp;</td>
        </tr>
        <p></p>
        <br></br>
        <br></br>
           Date: <apex:outputText value="{0,date, dd MMM yyyy} "> 

        <apex:param value="{!NOW()}"/>
                            </apex:outputText> 
<br></br>
<br></br>
Thank you for booking the following Delegates on the above CaseWare Training Course<br></br>          
Payment for all training has to be made in advance. You will find our bank details on the attached invoice.<br></br>             
Please fax proof of payment to (011) 252 9424.          <br></br>
    <p></p>
<h3>Cancellation Policy:</h3>                
As our training courses are extremely popular, please note that bookings have to be cancelled in writing at least 5 working days                
prior to the scheduled training date. At NO time are telephonic cancellations acceptable.      <br></br>         
Late cancellations will be changed at R950.00 per delegate. Non attendance will be charged at the full course cost.<br></br>                 
Should full payment not reflect in our bank account, proof of payment may be requested on registration of the course.               
<p></p>
<p></p>

</table>        
        
          <table width="100%" border="0">
                    <tr>
                        <td class="table-heading2" width="340px">Delegate Name</td>
                        <td class="table-heading2" style="text-align:center" width="150px">Dietary Requirements</td>
                        <td class="table-heading2" style="text-align:center" width="60px">Delegates</td>
                        <td class="table-heading2" style="text-align:center" width="170px">Payment Status</td>
                    </tr>
                    <apex:repeat value="{!delegates}" var="cw">
                    <tr class="table-text">
                        <td>{!cw.Contact__r.Name}</td>
                        <td style="text-align:center">{!cw.Dietary_Requirement__c}</td>
                        <td style="text-align:center"><apex:outputText value="{0,number, ###,###}">
                                <apex:param value="{!cw.No_of_Delegates__c}"/>
                            </apex:outputText>
                        </td>
                        <td style="text-align:center">{!cw.Payment_Status__c}</td>
                                            </tr>
                    </apex:repeat>
                  
 </table>
 <br></br>
 <br></br>
 <br></br>
<h3>Training Venue:</h3>                
<table>
    <tr><td></td><td></td><td>{!event.Venue__r.Name}</td></tr>
    <tr><td></td><td></td><td>{!event.Venue__r.Address__c}</td></tr>

</table>
<br></br>
<br></br>
If you have any queries, please don't hesitate to contact us.

 </html>
</apex:page>

 

The Controller:

public class TrainingConfirmation{

    private Account account;
    public ID AccountID {get; set;}
    public List<CQS_Delegate__c> delegate = new List<CQS_Delegate__c>();
    
     private CQS_Event__c event;
     public Id eventid;
     public Id accountpassedid;
          
   public PageReference genConfirm() {  
   PageReference result=new PageReference('/apex/atrainingfconfirmation2');
      result.getParameters().put('eventid', event.id); 
      result.getParameters().put('company', accountId); 
   return result; }
 
 
    public TrainingConfirmation(){
        eventid  = ApexPages.currentPage().getParameters().get('eventid');        
        accountpassedid  = ApexPages.currentPage().getParameters().get('company');        
        event= [SELECT Id, Name,Start_Date__c,Venue__r.Name,Venue__r.Address__c FROM CQS_Event__c WHERE Id = :eventid limit 1];  

        
    }
            
    public CQS_Event__c getevent(){
        return event;
    }
          
   public List<CQS_Delegate__c> getdelegates(){
        delegate = [SELECT Contact__c,No_of_Delegates__c,Contact__r.Name,Dietary_Requirement__c,Account__r.Name,Payment_Status__c from CQS_Delegate__c WHERE Event__c =:eventid and Account__c=:accountpassedid];
             return delegate;
    }
    
    
    
    public List<SelectOption> accounts    {  
    get    {
     if (accounts == null) {
        accounts = new List<SelectOption>();
        List<Account> citylist = new List<Account>();  
        citylist = [Select Id, Name from Account where ID IN (Select Account__c from CQS_Delegate__C where Event__C =:eventid) ];  
        for (Integer j=0;j<citylist.size();j++)  
        {      
        accounts.add(new SelectOption(citylist[j].ID,citylist[j].Name));  
        }  
    }
   return accounts;
   }
    set;
}

}

 

Many thanks for any help!!

Ross

  • March 10, 2011
  • Like
  • 0

Hi

 

I am struggling to pass the value of a selectlist (single) from one visualforce page to another.  I can pass the eventid but not the Account ID selected:-

 

Here is my VF page (controller follows):-

<apex:page Controller="TrainingConfirmation" sidebar="false"  showheader="false">
<apex:form >
<apex:pageblock >
<apex:pageBlockSection title="Training Confirmation - Select Company" columns="1">
      <apex:pageblocksectionItem >
                  <apex:selectList value="{!accountId}" size="1" id="accountId">
              <apex:selectOptions value="{!accounts}"/>
          </apex:selectList>
      </apex:pageblocksectionItem>    
                            </apex:pageblocksection>           
  </apex:pageblock>

<apex:outputlink value="/apex/atrainingfconfirmation2"> Click here to Generate Training Confirmation <apex:param name="company" value="{!accountId}"/> <apex:param name="eventid" value="{!event.id}"/></apex:outputlink>
</apex:form>
</apex:page>

 

Here is my Controller:

public class TrainingConfirmation{

    private Account account;
    public List<CQS_Delegate__c> delegate = new List<CQS_Delegate__c>();
    
    private CQS_Event__c event;
    public Id eventid;
     
    
    public TrainingConfirmation(){
        eventid='a0FR0000006pk4o';
        system.debug('delegate id: '+accountid);
        event= [SELECT Id, Name,Start_Date__c,Venue__r.Name,Venue__r.Address__c FROM CQS_Event__c WHERE Id = :eventid limit 1];  

        
    }
            
    public CQS_Event__c getevent(){
        return event;
    }
          
   public List<CQS_Delegate__c> getdelegates(){
        delegate = [SELECT Contact__c,No_of_Delegates__c,Contact__r.Name,Dietary_Requirement__c,Account__r.Name,Payment_Status__c from CQS_Delegate__c WHERE Event__c =:eventid ];
             return delegate;
    }
    
    
    public ID AccountID {get; set;}
    
    public List<SelectOption> accounts    {  
    get    {
     if (accounts == null) {
        accounts = new List<SelectOption>();
        List<Account> citylist = new List<Account>();  
        citylist = [Select Id, Name from Account where ID IN (Select Account__c from CQS_Delegate__C where Event__C =:eventid) ];  
        for (Integer j=0;j<citylist.size();j++)  
        {      
        accounts.add(new SelectOption(citylist[j].ID,citylist[j].Name));  
        }  
    }
   return accounts;
   }
    set;
}

}

 

  • February 23, 2011
  • Like
  • 0

Hi

 

How can I right-align my header items in a datatable (as in the code below)

 

       <apex:dataTable value="{!opportunity.opportunitylineitems}" var="line" rowClasses="odd,even"
                columnsWidth="550px, 60px, 100px, 100px, 100px">
                   <td><apex:column width="390px" ><apex:facet name="header">Description</apex:facet><apex:outputField value="{!line.PricebookEntry.name}"/></apex:column>
		           <td><apex:column style="text-align:right" width="60px"><apex:facet name="header" >Quantity</apex:facet> <apex:outputField value="{!line.Quantity}"/></apex:column></td>
		            <apex:column style="text-align:right" width="100px"> <apex:facet name="header" >Initial Fee</apex:facet><apex:outputText value="{0,number,R #,###.00}"> <apex:param value="{!line.UnitPrice}" /> </apex:outputText></apex:column> 
		            <apex:column style="text-align:right" width="100px"> <apex:facet name="header" >Est. Annual Fee</apex:facet><apex:outputText value="{0,number,R #,###.00}"> <apex:param value="{!line.UnitPrice}" /> </apex:outputText></apex:column> 
		            <apex:column style="text-align:right" width="100px" ><apex:facet name="header" >Total Price</apex:facet> <apex:outputText value="{0,number,R #,###.00}"> <apex:param value="{!line.TotalPrice}" /> </apex:outputText></apex:column> 
		        </apex:datatable>

 Many thanks

Ross

 

 

 

 

  • March 27, 2012
  • Like
  • 0
Hi I have a custom object (credit agreement) that has a lookup relationship to the Opportunity. I want to override the New button (for credit agreements) and retrieve values from the parental Opportunity. I have written a VF page that has a standard controller of the creditagreement__c and has extensions but in the extensions class I cannot seem to access the opportunity data. Help ! :) Many thanks to all in advance Ross
  • March 22, 2012
  • Like
  • 0

Hi

 

I want to write a trigger (before insert and after update) to set a single field on the Account record which is the concatentation of a field from many child records (from ERP_Account). 

 

For exmaple: if the ACCOUNT record has many ERP_Accounts with the value in field ACCOUNTNO as 'TEST1','TEST2','TEST3' respectively, then I want to set ACCOUNTNOS field in the Account record with the value 'TEST1, TEST2, TEST3,' 

 

Dont know where to start - any help would be greatly appreciated.

 

Thanks

Ross

  • April 15, 2011
  • Like
  • 0

Hi

 

I am having difficulty in accessing a parameter passed in a URL from one viuslforce page to another. I have two pages (atrainingconfirmatation and  atrainingfconfirmation2). They both use the same controller. The first one prompts the user to select a company who has delegates on this event. The second print a confirmation form. The first page passes the selected accountid to the second. In the controller, I use the accountid to select all the delegates for the event for the passed accountid but am getting no data. This is the code where the passed parameter is used

 

   public List<CQS_Delegate__c> getdelegates(){
        delegate = [SELECT Contact__c,No_of_Delegates__c,Contact__r.Name,Dietary_Requirement__c,Account__r.Name,Payment_Status__c from CQS_Delegate__c WHERE Event__c =:eventid and Account__c=:accountpassedid];
             return delegate;
    }

 

Page1:

 

<apex:page Controller="TrainingConfirmation" sidebar="false"  showheader="false">
<apex:form >
<apex:pageblock >
<apex:pageBlockSection title="Training Confirmation - Select Company" columns="1">
      <apex:pageblocksectionItem >
                  <apex:selectList value="{!accountId}" size="1" id="accountId">
              <apex:selectOptions value="{!accounts}"/>
          </apex:selectList>
      </apex:pageblocksectionItem>    
                            </apex:pageblocksection>           
  </apex:pageblock>

<apex:commandlink value="Click here to Generate Training Confirmation" action="{!genConfirm}"/>
</apex:form>
</apex:page>


 

Page2:

<apex:page Controller="TrainingConfirmation" renderas="PDF" sidebar="false"  showheader="false">

<html>
<head>
<style>
    body{
        font-family:Verdana, Geneva, sans-serif;
        font-size:12px;
    }
    .H1{
        color:#A3CC03;
        font-size:36px;
    }
    .H2{
        font-size:18px;
    }
    .table-heading1{
        color:#374B60;
        background-color:#CCC;
        font-weight:bold;
        padding:2px;
        font-size:14px;
    }
    .table-heading2{
        color:#374B60;
        background-color:#FFF;
        font-weight:bold;
    }
    .table-text{
        color:#374B60;
        background-color:#FFF;
        font-size:10px;
    }
    
    .table-bottom-line{
        border-top:solid 1px #374B60;
    }
    
    .statutory{
        font-size:10px;
    }
</style>

</head>
    <table width="720px" align="center" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td style="text-align:center">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:center">
                <apex:image value="{!$Resource.CQSLogo}" />
            </td>
        </tr>
        <tr>
            <td style="text-align:center">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:center" class="H1">Training Confirmation</td>
        </tr>
        <tr>
            <td style="text-align:center">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:center">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:center" class="H2">Course: {!event.name}</td>
        </tr>
        <tr>
          <td style="text-align:center">Course Date: <apex:outputText value="{0,date, dd MMM yyyy}">
                                <apex:param value="{!event.Start_Date__c}"/>
                            </apex:outputText> 
                            </td>
</tr>
        <tr>
                                <td style="text-align:center">&nbsp;</td>
        </tr>
        <p></p>
        <br></br>
        <br></br>
           Date: <apex:outputText value="{0,date, dd MMM yyyy} "> 

        <apex:param value="{!NOW()}"/>
                            </apex:outputText> 
<br></br>
<br></br>
Thank you for booking the following Delegates on the above CaseWare Training Course<br></br>          
Payment for all training has to be made in advance. You will find our bank details on the attached invoice.<br></br>             
Please fax proof of payment to (011) 252 9424.          <br></br>
    <p></p>
<h3>Cancellation Policy:</h3>                
As our training courses are extremely popular, please note that bookings have to be cancelled in writing at least 5 working days                
prior to the scheduled training date. At NO time are telephonic cancellations acceptable.      <br></br>         
Late cancellations will be changed at R950.00 per delegate. Non attendance will be charged at the full course cost.<br></br>                 
Should full payment not reflect in our bank account, proof of payment may be requested on registration of the course.               
<p></p>
<p></p>

</table>        
        
          <table width="100%" border="0">
                    <tr>
                        <td class="table-heading2" width="340px">Delegate Name</td>
                        <td class="table-heading2" style="text-align:center" width="150px">Dietary Requirements</td>
                        <td class="table-heading2" style="text-align:center" width="60px">Delegates</td>
                        <td class="table-heading2" style="text-align:center" width="170px">Payment Status</td>
                    </tr>
                    <apex:repeat value="{!delegates}" var="cw">
                    <tr class="table-text">
                        <td>{!cw.Contact__r.Name}</td>
                        <td style="text-align:center">{!cw.Dietary_Requirement__c}</td>
                        <td style="text-align:center"><apex:outputText value="{0,number, ###,###}">
                                <apex:param value="{!cw.No_of_Delegates__c}"/>
                            </apex:outputText>
                        </td>
                        <td style="text-align:center">{!cw.Payment_Status__c}</td>
                                            </tr>
                    </apex:repeat>
                  
 </table>
 <br></br>
 <br></br>
 <br></br>
<h3>Training Venue:</h3>                
<table>
    <tr><td></td><td></td><td>{!event.Venue__r.Name}</td></tr>
    <tr><td></td><td></td><td>{!event.Venue__r.Address__c}</td></tr>

</table>
<br></br>
<br></br>
If you have any queries, please don't hesitate to contact us.

 </html>
</apex:page>

 

The Controller:

public class TrainingConfirmation{

    private Account account;
    public ID AccountID {get; set;}
    public List<CQS_Delegate__c> delegate = new List<CQS_Delegate__c>();
    
     private CQS_Event__c event;
     public Id eventid;
     public Id accountpassedid;
          
   public PageReference genConfirm() {  
   PageReference result=new PageReference('/apex/atrainingfconfirmation2');
      result.getParameters().put('eventid', event.id); 
      result.getParameters().put('company', accountId); 
   return result; }
 
 
    public TrainingConfirmation(){
        eventid  = ApexPages.currentPage().getParameters().get('eventid');        
        accountpassedid  = ApexPages.currentPage().getParameters().get('company');        
        event= [SELECT Id, Name,Start_Date__c,Venue__r.Name,Venue__r.Address__c FROM CQS_Event__c WHERE Id = :eventid limit 1];  

        
    }
            
    public CQS_Event__c getevent(){
        return event;
    }
          
   public List<CQS_Delegate__c> getdelegates(){
        delegate = [SELECT Contact__c,No_of_Delegates__c,Contact__r.Name,Dietary_Requirement__c,Account__r.Name,Payment_Status__c from CQS_Delegate__c WHERE Event__c =:eventid and Account__c=:accountpassedid];
             return delegate;
    }
    
    
    
    public List<SelectOption> accounts    {  
    get    {
     if (accounts == null) {
        accounts = new List<SelectOption>();
        List<Account> citylist = new List<Account>();  
        citylist = [Select Id, Name from Account where ID IN (Select Account__c from CQS_Delegate__C where Event__C =:eventid) ];  
        for (Integer j=0;j<citylist.size();j++)  
        {      
        accounts.add(new SelectOption(citylist[j].ID,citylist[j].Name));  
        }  
    }
   return accounts;
   }
    set;
}

}

 

Many thanks for any help!!

Ross

  • March 10, 2011
  • Like
  • 0

I have textbox which has a decimal  value fetched from controller. I need to show the value with 2 zero's after decimal point. Currently its displaying just 1 zero.

 

 

<apex:inputText styleclass="tb2" value="{!a.TimeCardObj.Monday_Hours__c}"/>

 

 

Thanks

Prady

  • February 14, 2011
  • Like
  • 0