• BobP
  • NEWBIE
  • 145 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 48
    Questions
  • 82
    Replies
I adjust my flow and it does work where a case is created and it redirects to a newly created case with no other screen works when i add the lightning component to my lightning home page layout. 

But, It is very odd when executing the same flow from a Global Action menu it still works but there is a Finish button at the end of the flow and then it returns back to the beginning of the flow. 

I don't know if there is something else I can add to change the behavior in the lightning component global action button to perform like it does on the home page or outside of the global action button. I need the last screen to go away when the user is finished. When I added  $A.get("e.force:closeQuickAction").fire() to the controller it worked a couple of time and then stop working. Maybe it's something in my loop I'm just can't get this to work consistently

Component:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:lightningQuickAction" >

<!-- Initialize the component to show the flow -->
<aura:handler name="init" value="{!this}" action="{!c.init}" />

<!-- The marker for the flow. with a listener on the status change -->
<lightning:flow aura:id="flowData" onstatuschange="{!c.handleStatusChange}" />
    <br/>
    
</aura:component>

Controller:
({
/* Launch the correct flow */
  init : function (cmp) {
    var flow = cmp.find("flowData");
    flow.startFlow("New_IT_Support_Case");
      
  },

/*On change listener*/
handleStatusChange : function (component, event) {
   if(event.getParam("status") === "finish") {
      var outputVariables = event.getParam("outputVariables");
      var outputVar;
      for(var i = 0; i < outputVariables.length; i++) {
         outputVar = outputVariables[i];
         if(outputVar.name === "New_IT_Support_Case") 
       
         $A.get("e.force:closeQuickAction").fire()
  
  
        }
       
     }
  }    
   
})

 
  • May 05, 2020
  • Like
  • 0
I am creating a visualforce pdf document and  I am using the Account standard object. There are three record types Site, Customer and Vendor.

This text field is on the Site account records with account record type of Site.  This field I have on my VF page is Account.Service_Agreement_Verbiage__c. When i go to test this field no information is displayed even though the text field does have text entered into it

Is this because of the record type? It seems like it should be straight forward. Any help would be greatly appreciated. 
  • March 23, 2020
  • Like
  • 0
I am working on trying to convert a visualforce page to look like a lightning related list, I added the lightningStylesheets="true" to my page but it still looks like classic. I'm guessing it is the pageblock tags.

How would convert those to the lightning UI?
 
<apex:page standardController="Bids_Sent__c" lightningStylesheets="true" recordSetVar="bids" extensions="UpdateBids"
    showHeader="false"
    id="muopp"
    
   
>

    <apex:form >
        
        <apex:pageBlock title="Update Selected Bids" mode="edit"  >
            <apex:pageMessages />
            <apex:pageBlockSection  >
                <apex:inputField value="{!Bids_Sent__c.IsAddedToPDF__c}" id="stagename">
                    <apex:actionSupport event="onchange" rerender="muselectedlist"/>
                </apex:inputField>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom"  >
                <apex:commandButton value="Save" action="{!save}" id="butsav"/>
                <apex:commandButton value="Cancel" action="{!cancel}" />
            </apex:pageBlockButtons>
        </apex:pageBlock>
        <apex:pageBlock title="Selected Bids for PDF" id="muselectedlist" >
            <apex:pageBlockTable value="{!selected}" var="bid" id="bidtab" >
                <apex:column value="{!bid.name}" id="bidname"/>
                <apex:column value="{!bid.IsAddedToPDF__c}" id="isbid"/>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>



 
  • March 03, 2020
  • Like
  • 0
I have a apex class for a visualforce page with the soql query that i would like to addition conditions but when i try to add the change i get an error. I'm not sure how my query should be disigned.
"
Error: Compile Error: Expecting ']' but was: 'OR' at line 13 column 227"
 
// Used on the account page updated 1-31-2020
Public Class VF_SiteServicePartnerAllController{
   private Account acc;
   public List<Site_Service_Partner__c> sspList {get;set;}
   
   public VF_SiteServicePartnerAllController(ApexPages.StandardController sp){
       acc = (Account)sp.getRecord();
       sspList = new List<Site_Service_Partner__c>();
       sspList = [SELECT Id,Name,Site_Account__c,Primary_Field_Contact__c,Service_Partner__c,
                  Service_Partner_Owner__c,Service_Partner_Owner_Mobile__c,Service_Partner_Owner_Email__c,
                  Primary_Field_Email__c,Primary_Field_Mobile__c,Service_Partner_Site_Status__c, 
                  Contracted_Services__c,Secondary_Field_Contact__c,Secondary_Field_Email__c,Secondary_Field_Mobile__c,
                  Service_Partner_Start_Date__c,Service_Partner_End_Date__c,Service_Partner_Main_Phone__c,Trade__c,Supported_Trade__c  FROM Site_Service_Partner__c WHERE Site_Account__c =: acc.Id AND Trade__c includes('Land') OR Trade__c includes('Snow') AND Service_Partner_Site_Status__c = 'Active' ];

    
    Set<Id> bidId = new  Set<Id>();  
    for(Site_Service_Partner__c bs:sspList){
       bidId.add(bs.Id);
    }
     
   }

}




 
  • February 07, 2020
  • Like
  • 0
I am creating a visualforce page and the field label is to the left of the field like classic but I have the lightning stylesheet set to true? 

What am I missing to get the field name on the top of the field like on a standard account page in LEX?

User-added image
Visualforce Code:
<apex:page standardController="Account" lightningStylesheets="true" > 
   
    <apex:form>

    <apex:pageBlock title="Snow Site Account Info">
       <apex:pageBlockSection>
    
    
    <apex:outputLabel value="Contract Status">
       <apex:inputField value="{!Account.Contract_Status__c}"/>
       </apex:outputLabel>
      
    <apex:outputLabel value="Contract Status">
       <apex:inputField value="{!Account.Contract_Status__c}"/>
       </apex:outputLabel>
      
       </apex:pageBlockSection>
</apex:form>
</apex:page>



 
  • January 23, 2020
  • Like
  • 0
I have a extension contrlloer for a visualforce page that i need to create a simple text class, but i'm not sure how to accomplish this. Any help would be greatly appreciated. My apex controller is below.
 
Public Class AccountExtensionController{
   private Account acct;
   public List<Bids_Sent__c> bidsList {get;set;}
   public Map<String,List<Site_Bid_Details__c>>  bidsMap {get;set;}
   public AccountExtensionController(ApexPages.StandardController sc){
       acct = (Account)sc.getRecord();
       bidsList = new List<Bids_Sent__c>();
       bidsList = [SELECT Id,IsAddedToPDF__c,Customer__r.Service_Agreement_Verbiage__c,Site__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Site__r.Customer_Location_ID__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c =: acct.Id AND IsAddedToPDF__c=true];
    
    Set<Id> bidId = new  Set<Id>();  
    for(Bids_Sent__c bs : bidsList){
     bidId.add(bs.Id);
    }
     
    bidsMap = new Map<String,List<Site_Bid_Details__c>> ();
    for(Site_Bid_Details__c bd : [SELECT Id, Bid_Name__r.Name,Site__c,Site__r.Customer_Location_ID__c,Cost__c,Increment__c,Total__c,Price__c,Scope__c,Bid_Name__r.Service_Type__c,Number_of_Months__c,Retainer_Fee__c,Monthly_Payment__c,UOM__c  FROM Site_Bid_Details__c WHERE Bid_Name__c IN : bidId]){
        
    if(bidsMap.containsKey(bd.Bid_Name__r.Name)){
    System.debug('CONTAINS KEY: ' + bd.Bid_Name__r.Name);
    bidsMap.get(bd.Bid_Name__r.Name).add(bd);
    } 
  
    else { 
    System.debug('CREATE: ' + bd.Bid_Name__r.Name);
    bidsMap.put(bd.Bid_Name__r.Name,new List<Site_Bid_Details__c>{bd}); 
   }
 } 

}

}

 
  • January 10, 2020
  • Like
  • 1
I am working on a flow wrapped in a lightning component as a global action and i am trying to figure out how to change the finish bahavior so the user is redirected to the home page. I came across these events ( force:navigateToObjectHome or force:navigateToUrl.) but I'm not sure where to used them in my lightning component. Any help with this would be greatly appreciated. My code is below for my component

Component:
<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickActionWithoutHeader" access="global" >

<aura:handler name="init"  value="{!this}" action="{!c.init}" />
<lightning:flow aura:id="flowData" />
</aura:component>

Controller:
 
({
init : function (component) {
// Find the component whose aura:id is "flowData"
var flow = component.find("flowData");
// In that component, start your flow. Reference the flow’s Unique Name.
flow.startFlow("New_IT_Support_Case");
   
},
})



 
  • January 10, 2020
  • Like
  • 0
I have created a flow to create new case records and I'm trying to add the file upload component to attach files. When I run the debug to see if it is working. The screen to upload files is greyed out.  I'm not sure if i have the setup correct. please any help to get this working would be greatly appreciated. 

User-added image
User-added image
  • January 09, 2020
  • Like
  • 0

My company has an custom heat map that works fine in the old salesforce mobile app for ipad, but when i turn on the new permission set for the new salesforce mobile app the custom heat map does not render correctly. Users can not see the map. I just wondering what could cause this issue. User-added imageThe way it should look.
User-added image
  • November 12, 2019
  • Like
  • 0
I installed an app from the App Exchange that should allow users to see if another user is viewing a record at the same time. I can't seem to get this product to work and I keep getting the following error. 

The link to the app is Whos Viewing My Record (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FKAhhUAH)

Does anyone know why thosd error occurs?
[PromiseRejection: Error: Invalid or missing utilityId `false`]
{anonymous}()@https://case-snow--ma.lightning.force.com/auraFW/javascript/EKaz_EreV5yXey4_N719Ng/aura_prod.js:930:238
He.e.$$lwcEventWrapper$$()@https://case-snow--ma.lightning.force.com/auraFW/javascript/EKaz_EreV5yXey4_N719Ng/aura_prod.js:1:4410



 
  • September 20, 2019
  • Like
  • 0
I have an apex extension controller that i need to write a test class, but I'm not sure how to write a test class for this type of controller. Any help would be greatly appreciated. My code is below.
 
Public Class AccountExtensionController{
   private Account acc;
   public List<Bids_Sent__c> bidsList {get;set;}
   public Map<String,List<Site_Bid_Details__c>>  bidsMap {get;set;}
   public AccountExtensionController(ApexPages.StandardController sc){
       acc = (Account)sc.getRecord();
       bidsList = new List<Bids_Sent__c>();
       bidsList = [SELECT Id,IsAddedToPDF__c,Customer__r.Service_Agreement_Verbiage__c,Site__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Site__r.Customer_Location_ID__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c =: acc.Id AND IsAddedToPDF__c=true];
    
    Set<Id> bidId = new  Set<Id>();  
    for(Bids_Sent__c bs : bidsList){
       bidId.add(bs.Id);
    }
     
    bidsMap = new Map<String,List<Site_Bid_Details__c>> ();
    for(Site_Bid_Details__c bd : [SELECT Id, Bid_Name__r.Name,Site__c,Contract_Start_Month__c,Site__r.Customer_Location_ID__c,Cost__c,Customer__r.Contract_Month__c,Increment__c,Total__c,Price__c,Scope__c,Bid_Name__r.Service_Type__c,Number_of_Months__c,Retainer_Fee__c,Monthly_Payment__c,UOM__c  FROM Site_Bid_Details__c WHERE Bid_Name__c IN : bidId]){
        
        if(bidsMap.containsKey(bd.Bid_Name__r.Name)){
  System.debug('CONTAINS KEY: ' + bd.Bid_Name__r.Name);
  bidsMap.get(bd.Bid_Name__r.Name).add(bd);
} else { 
  System.debug('CREATE: ' + bd.Bid_Name__r.Name);
  bidsMap.put(bd.Bid_Name__r.Name,new List<Site_Bid_Details__c>{bd}); 
}
    } 

}

}

 
  • September 12, 2019
  • Like
  • 0
I was wondering if it is possible to acheive creating a visualforce page with using  apex:repeat that looks similar to my screenshot below. primarly I'm looking at the Payment Schedule section

User-added image
  • August 28, 2019
  • Like
  • 0
I have a visualforce page with apex:repeat and output panels. my issue is my page is displaying the same records twice and I'm not sure why. my code is below. Any help with this would be greatly appreciated.
User-added image
<apex:page standardcontroller="Account" renderas="pdf" extensions="AccountExtensionController" standardstylesheets="false" showheader="false" applyhtmltag="false">
<form >
<html xmlns="http://www.w3.org/1999/xhtml">
    <body style="color:#000000;border-style:solid; border-width:0px; width:85%; text-align:center">
    </body>

    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;text-align:left;"
               cellpadding="2">
            
            <tr>
                <td colspan="4" style="font-size:12px; font-weight: normal">
                </td>
            </tr>
            
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style:solid; border-width:1px;
                border-color:#000000;padding:3px;text-align:center;background-color:#B4C6E7">
                    SERVICE PARTNER DETAILS
                </td>
            </tr>

    </table>
            
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; text-align:left;"
               cellpadding="2">
            <tr>
                <td width="50%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px;padding-top:10px">
                    <b>Company</b> {!Account.Name}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="50%" align="right" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:#ffffff;font-style:normal; font-weight:normal;padding:3px;padding-top:10px">
                    <b>Office Phone</b> {!Account.Phone}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>Contact</b> {!Account.Primary_Field_POC__r.FirstName} {!Account.Primary_Field_POC__r.LastName} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:  #ffffff;font-style:normal; font-weight:normal;padding:3px"><b>Cell Phone</b> {!Account.Secondary_Phone__c}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>Street Address</b><br/> {!Account.BillingStreet}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:#ffffff;font-style:normal; font-weight:normal;padding:3px"><b>Fax</b> {!Account.Fax}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>City, St. Zip</b><br/> {!Account.BillingCity}, {!Account.BillingState} {!Account.BillingPostalCode}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color: #ffffff;font-style:normal; font-weight:normal;padding-bottom:10px"><b>Email</b> {!Account.Primary_Field_POC__r.Email}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style: solid; border-width:1px;
                border-color: #000000;padding:3px;padding:3px;text-align:center;background-color:#B4C6E7">PER PUSH FEE SERVICE AGREEMENT</td>
            </tr>
    </table>
            
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;  text-align:left;"
               cellpadding="4">
          
            <tr>
               
            <td width="50%" align="left" style="color: #000000;text-align:center; border-right-style: solid; border-right-width: thin;
                border-right-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">Per Push Fees: Includes all fees necessary to complete the services described in the scope of work for the event duration.  Hourly pricing applies only to extra services.
            </td>
            </tr>
    </table>
 
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;text-align:center;" cellpadding="2">
            
            <tr>
                <td colspan="4" style="font-size:12px; font-weight: normal">
                </td>
            </tr>
            
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style: solid; border-width:1px;
                border-color:#000000;padding:3px;background-color:#B4C6E7;">
                  Service Locations and Fees
                </td>
            </tr>
        <tr><td></td></tr>
    </table>
   
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; text-align:center;"
               cellpadding="0">
              
            <apex:repeat var="sd" value="{!bidsList}">
          
              <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central; font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">

                    <tr>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px; border-top-style:solid">Site Name</th>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px; border-top-style:solid">Service Period</th>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px;border-top-style:solid">Address</th>
                    </tr>

                   </apex:outputPanel>
                 
                <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central;font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">
                   
                    <tr>
                       
                        <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"> {!sd.Customer__r.Name }</apex:outputPanel> </td>
                       
                       <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"> <apex:outputText value="{0, date, MMMM d','  yyyy}">
                        <apex:param value="{!sd.Customer__r.Contract_Start_Date__c}" /> </apex:outputText>Seasonal<apex:outputText value="{0, date, MMMM d','  yyyy}"><apex:param value="{!sd.Customer__r.Contract_End_Date__c}" /></apex:outputText>

                </apex:outputPanel></td>

                       <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}">{!sd.Site__r.BillingStreet}<br/>{!sd.Site__r.BillingCity}, {!sd.Site__r.BillingState} {!sd.Site__r.BillingPostalCode} </apex:outputPanel></td>

                    </tr>

                </apex:outputPanel>
                
               
                       <apex:repeat var="et" value="{!bidsMap[sd.Name] }" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"    >
    
                           <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central;font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">
                   <tr>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid">Month</th>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid"></th>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid">Monthly Payment</th>
                      
                   </tr>

                   
    </apex:outputPanel>
        
            
            <apex:outputPanel layout="none" rendered="{!IF(et.Contract_Start_Month__c = 'January' && sd.IsAddedToPDF__c =true  ,true,false)}">
         <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jan-20</td>
                            
                            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>

            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 2 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Feb-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 3 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Mar-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 4 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Apr-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 5 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-May-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
           

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 6 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jun-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
          

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 7 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jul-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 8 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Aug-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 9 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Sep-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 10 && sd.IsAddedToPDF__c =true  ,true,false)}">

        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Oct-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText> </td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 11 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Nov-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 12 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Dec-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
        </apex:outputPanel>
             
             <apex:outputPanel layout="none" rendered="{!IF( sd.IsAddedToPDF__c =true  ,true,false)}" style="font-family: Arial, Helvetica, sans-serif; text-align:center;">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:right;background-color:#f2f2f2;width:33%; text-align:center">Retainer Fee</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:20%"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:25%"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Retainer_Fee__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
            
            <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="font-family: Arial, Helvetica, sans-serif; text-align:center;">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:40%"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><b>Total&#58; &nbsp;</b><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Total__c}" /> </apex:outputText></td>
        </tr>
             
           
        </apex:outputPanel>
           </apex:repeat>
           </apex:repeat>
        </table>
     </html>
</form>

</apex:page>

 
  • August 13, 2019
  • Like
  • 0
I have a visualforce page that I want to use a date field to rerender an output panel if the date is a certain month.

Currently I'm using a number field for this section but i would like to use a date field called Contract_Start_Date__c.

I'm not sure how to format the formula to check for what month it is from the Contract Start date. .  

<apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 12  ,true,false)}">

I would like to do something like this below
{!IF(MONTH (et.Contract_Start_Date__c)  == 12  ,true,false))}
  • August 12, 2019
  • Like
  • 0
I've been trying to figure out a formula for a monthly payment field and my calculations are not coming out correctly.

my formula field formula has a cost(total) field a Number of Months field and a retainer field.

Cost__c  - Currency field
Number_of_Months__c - Number field
Retainer_Fee__c - Currency field 

So I've tried ((Cost__c / Number_of_Months__c) - Retainer_Fee__c) 

Calculation is incorrect though.

Any help with formula would be greatly appreciated
  • August 12, 2019
  • Like
  • 0
I am working on a visualforce page that has an issue with the last two rows shifting to the left.

Below is the VF code. The code is looking at a number field to simulate months in a year. The last two <outputPanel>'s  shift to the left for some reason and I cant figure it out.

If I move those two panels somewhere in the middle of the code it aligns perfectly. 

Any help on this would be greatly appreciated.


 
<apex:page standardcontroller="Account" renderas="pdf" extensions="AccountExtensionController" standardstylesheets="false" showheader="false" applyhtmltag="false">
<form >
<html xmlns="http://www.w3.org/1999/xhtml">
    <body style="color:#000000;border-style:solid; border-width:0px; width:85%; text-align:center">
    </body>

    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;text-align:left;"
               cellpadding="2">
            
            <tr>
                <td colspan="4" style="font-size:12px; font-weight: normal">
                </td>
            </tr>
            
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style:solid; border-width:1px;
                border-color:#000000;padding:3px;text-align:center;background-color:#B4C6E7">
                    SERVICE PARTNER DETAILS
                </td>
            </tr>

    </table>
            
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; text-align:left;"
               cellpadding="2">
            <tr>
                <td width="50%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px;padding-top:10px">
                    <b>Company</b> {!Account.Name}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="50%" align="right" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:#ffffff;font-style:normal; font-weight:normal;padding:3px;padding-top:10px">
                    <b>Office Phone</b> {!Account.Phone}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>Contact</b> {!Account.Primary_Field_POC__r.FirstName} {!Account.Primary_Field_POC__r.LastName} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:  #ffffff;font-style:normal; font-weight:normal;padding:3px"><b>Cell Phone</b> {!Account.Secondary_Phone__c}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>Street Address</b><br/> {!Account.BillingStreet}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:#ffffff;font-style:normal; font-weight:normal;padding:3px"><b>Fax</b> {!Account.Fax}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>City, St. Zip</b><br/> {!Account.BillingCity}, {!Account.BillingState} {!Account.BillingPostalCode}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color: #ffffff;font-style:normal; font-weight:normal;padding-bottom:10px"><b>Email</b> {!Account.Primary_Field_POC__r.Email}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style: solid; border-width:1px;
                border-color: #000000;padding:3px;padding:3px;text-align:center;background-color:#B4C6E7">PER PUSH FEE SERVICE AGREEMENT</td>
            </tr>
    </table>
            
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;  text-align:left;"
               cellpadding="4">
          
            <tr>
               
            <td width="50%" align="left" style="color: #000000;text-align:center; border-right-style: solid; border-right-width: thin;
                border-right-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">Per Push Fees: Includes all fees necessary to complete the services described in the scope of work for the event duration.  Hourly pricing applies only to extra services.
            </td>
            </tr>
    </table>
 
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;text-align:center;" cellpadding="2">
            
            <tr>
                <td colspan="4" style="font-size:12px; font-weight: normal">
                </td>
            </tr>
            
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style: solid; border-width:1px;
                border-color:#000000;padding:3px;background-color:#B4C6E7;">
                  Service Locations and Fees
                </td>
            </tr>
        <tr><td></td></tr>
    </table>
   
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; text-align:center;"
               cellpadding="0">
              
            <apex:repeat var="sd" value="{!bidsList}">
          
              <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central; font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">

                    <tr>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px; border-top-style:solid">Site Name</th>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px; border-top-style:solid">Service Period</th>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px;border-top-style:solid">Address</th>
                    </tr>

                   </apex:outputPanel>
                 
                <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central;font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">
                   
                    <tr>
                       
                        <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"> {!sd.Customer__r.Name }</apex:outputPanel> </td>
                       
                       <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"> <apex:outputText value="{0, date, MMMM d','  yyyy}">
                        <apex:param value="{!sd.Customer__r.Contract_Start_Date__c}" /> </apex:outputText>Seasonal<apex:outputText value="{0, date, MMMM d','  yyyy}"><apex:param value="{!sd.Customer__r.Contract_End_Date__c}" /></apex:outputText>

                </apex:outputPanel></td>

                       <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}">{!sd.Site__r.BillingStreet}<br/>{!sd.Site__r.BillingCity}, {!sd.Site__r.BillingState} {!sd.Site__r.BillingPostalCode} </apex:outputPanel></td>

                    </tr>

                </apex:outputPanel>
               
                       <apex:repeat var="et" value="{!bidsMap[sd.Name] }" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"    >
    
                   <tr>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid">Month</th>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid"></th>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid">Monthly Payment</th>
                      
                   </tr>

                   
        <apex:outputPanel layout="none" rendered="{!IF(et.UOM__c ='Seasonal'  ,true,false)}" style="vertical-align:central; font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">
        
            
            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 1  ,true,false)}">
         <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jan-20</td>
                            
                            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>

            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 2  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Feb-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 3  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Mar-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 4  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Apr-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 5  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-May-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
           

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 6  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jun-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
          

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 7  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jul-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 8  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Aug-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 9  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Sep-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 10  ,true,false)}">

        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Oct-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText> </td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 11  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Nov-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 12  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Dec-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
             </apex:outputPanel>
             
             <apex:outputPanel layout="none" rendered="{!IF(et.UOM__c ='Seasonal'  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">Retainer Fee</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Retainer_Fee__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
             <apex:outputPanel layout="none" rendered="{!IF(et.UOM__c ='Seasonal'  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><b>Total&#58; &nbsp;</b><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Total__c}" /> </apex:outputText></td>
        </tr>
             </apex:outputPanel>
             </apex:outputPanel>
             </apex:repeat>
             </apex:repeat>
        </table>
     </html>
</form>

</apex:page>

 
  • August 12, 2019
  • Like
  • 0
I have an interesting problem that i cant seemed to figure out.
I am trying to create a visualforce page pdf with one or apex:repeat components.
I wuold like to create a pdf from the account object that displays related records to the account object and also child record information that is associated to the related record of the account.

I tried creating the following code but i am getting an error.

Error: Unknown property 'VisualforceArrayList.Bid_Deliverables__r'


the first Apex:Repeat gets the related records to the account, the second should return the related records to the related object to the account. I'm not sure if this can be done. Any help would be greatly appreciated. 



 
<apex:page standardcontroller="Account" renderas="pdf" standardstylesheets="false" showheader="false" applyhtmltag="false">
<form >
<html xmlns="http://www.w3.org/1999/xhtml">
    <body>
    </body>
    
 <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; border-collapse: collapse;  text-align:center;"
               cellpadding="2">
            
<apex:repeat var="sd" value="{!Account.Bids_Sent4__r}">
                   
<tr>
<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr"> {!sd.Name}</td>

<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr">${!sd.Site__r.Name}</td></tr>

<apex:repeat var="et" value="{!Account.Bids_Sent4__r.Bid_Deliverables__r}"  >
<tr>
<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr"> {!et.Scope__c} {!et.Increment__c}</td>

<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr">${!et.Price__c}</td>

<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr">${!et.Bid_Name__r.Name}</td>
</tr>
  </apex:repeat>
</apex:repeat>
</table></html>
</form>
</apex:page>




 
  • July 30, 2019
  • Like
  • 0
Below I am using this trigger to create new products, but if a user wants to add more products, my trigger does not allow it because it sees a record is already assigned to the opportunity it does nothing.

I tried to change part of my code to allow a user to add more products, but I get errors in my code.

I want to give my users the ability to add more products to the opportunity record if needed and I can't figure out how to update my trigger to handle this request.

Is there a way to change the behavior in the trigger so once a user enters a number in the product quantity field and the products are created the trigger then blanks the product quantity field so if a user enters a new product quantity number, it then created that number of products for that record? 

If anyone can give me advice to  update my trigger to accomadate this request or if there is another trigger out there to accomplish this request I would greatly appreciate it.
 
trigger tr_MultiProductsCreated on Opportunity  (after insert, after update) 
{
  
   List<Yushin_Product__c> ProductRecordsFinalListToInsert = New List<Yushin_Product__c>();
    
    If(Trigger.IsInsert || Trigger.IsUpdate)
    {
        For(Opportunity opp : Trigger.New)
        {
            If(opp.Product_Qauntity__c != null)
            {
                List<Yushin_Product__c> fetchingAlreadyExistsedRecords = [Select Id FROM Yushin_Product__c WHERE Opportunity__c =:opp.Id];
                
                If(fetchingAlreadyExistsedRecords.IsEmpty())
                {
                    // I need to create more records if a new number is added to the field.
                    For(Integer I = 0; I < opp.Product_Qauntity__c; I++)
                    {
                        Yushin_Product__c prd = New Yushin_Product__c();
                        
                        prd.Opportunity__c = opp.Id;
                        ProductRecordsFinalListToInsert.add(prd);
                    }
                }
                
            }
            
            try{
                If(!ProductRecordsFinalListToInsert.IsEmpty()){
                    insert ProductRecordsFinalListToInsert;
                }
            }
            Catch(Exception e){
                System.debug('The thrown exception for CreatingAutoRecords is:: ' + e.getMessage());
            }
        }
    }
    
}

 
  • July 12, 2019
  • Like
  • 0
I created a flow and added it to a visualforce page so i can use it on a force.com site as a web form. Some of my input fields are lightning components, so when i go to the site the fields that have the lightning components gives me the dredged "We can’t display component 'flowruntime:phone', because it isn't supported in Classic runtime. Ask your Salesforce admin to distribute this flow in Lightning runtime instead".

I tried creating the following aura component  and added it to my visualforce page, but now I get a blank screen when i click on my site link even in view as a admin. Any help with this would be greatly appreciated.

Aura Component:
<aura:application access="global" extends="ltng:outApp" >
    <aura:dependency resource="lightning:flow"/>
</aura:application>


Visualforce Page:
<apex:page showHeader="false" sidebar="false" lightningStylesheets="true" standardStylesheets="false" standardController="SP_Application__c" >
  
  <html>
      <head>
         <apex:includeLightning />
      </head>
      <body class="slds-scope">
         <div id="flowContainer" />
         <script>
           
            $Lightning.use("c:lightningOutApp", function() {
               // Create the flow component and set the onstatuschange attribute
               $Lightning.createComponent("lightning:flow", {"onstatuschange":statusChange},
                  "flowContainer",
                  function (component) {
                                         
                     // Start an interview in the flowContainer div, and 
                     // initializes the input variables.
                     component.startFlow("Service_Provider_Application", inputVariables);
                  }
              
         </script>
      </body>
   </html>

</apex:page>

 
  • June 19, 2019
  • Like
  • 0
I created a flow and added it to a visualforce page so i can use it on a force.com site to use as a web form. Some of my input fields are lightning components, so when i go to the site the fields that have the lightning components gives me the dredged "We can’t display component 'flowruntime:phone', because it isn't supported in Classic runtime. Ask your Salesforce admin to distribute this flow in Lightning runtime instead".
Is there a way to activate lightning runtime on my force.com site or visualforce page so these fields work on my site?   
  • June 12, 2019
  • Like
  • 0
I have a extension contrlloer for a visualforce page that i need to create a simple text class, but i'm not sure how to accomplish this. Any help would be greatly appreciated. My apex controller is below.
 
Public Class AccountExtensionController{
   private Account acct;
   public List<Bids_Sent__c> bidsList {get;set;}
   public Map<String,List<Site_Bid_Details__c>>  bidsMap {get;set;}
   public AccountExtensionController(ApexPages.StandardController sc){
       acct = (Account)sc.getRecord();
       bidsList = new List<Bids_Sent__c>();
       bidsList = [SELECT Id,IsAddedToPDF__c,Customer__r.Service_Agreement_Verbiage__c,Site__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Site__r.Customer_Location_ID__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c =: acct.Id AND IsAddedToPDF__c=true];
    
    Set<Id> bidId = new  Set<Id>();  
    for(Bids_Sent__c bs : bidsList){
     bidId.add(bs.Id);
    }
     
    bidsMap = new Map<String,List<Site_Bid_Details__c>> ();
    for(Site_Bid_Details__c bd : [SELECT Id, Bid_Name__r.Name,Site__c,Site__r.Customer_Location_ID__c,Cost__c,Increment__c,Total__c,Price__c,Scope__c,Bid_Name__r.Service_Type__c,Number_of_Months__c,Retainer_Fee__c,Monthly_Payment__c,UOM__c  FROM Site_Bid_Details__c WHERE Bid_Name__c IN : bidId]){
        
    if(bidsMap.containsKey(bd.Bid_Name__r.Name)){
    System.debug('CONTAINS KEY: ' + bd.Bid_Name__r.Name);
    bidsMap.get(bd.Bid_Name__r.Name).add(bd);
    } 
  
    else { 
    System.debug('CREATE: ' + bd.Bid_Name__r.Name);
    bidsMap.put(bd.Bid_Name__r.Name,new List<Site_Bid_Details__c>{bd}); 
   }
 } 

}

}

 
  • January 10, 2020
  • Like
  • 1
I have a apex class for a visualforce page with the soql query that i would like to addition conditions but when i try to add the change i get an error. I'm not sure how my query should be disigned.
"
Error: Compile Error: Expecting ']' but was: 'OR' at line 13 column 227"
 
// Used on the account page updated 1-31-2020
Public Class VF_SiteServicePartnerAllController{
   private Account acc;
   public List<Site_Service_Partner__c> sspList {get;set;}
   
   public VF_SiteServicePartnerAllController(ApexPages.StandardController sp){
       acc = (Account)sp.getRecord();
       sspList = new List<Site_Service_Partner__c>();
       sspList = [SELECT Id,Name,Site_Account__c,Primary_Field_Contact__c,Service_Partner__c,
                  Service_Partner_Owner__c,Service_Partner_Owner_Mobile__c,Service_Partner_Owner_Email__c,
                  Primary_Field_Email__c,Primary_Field_Mobile__c,Service_Partner_Site_Status__c, 
                  Contracted_Services__c,Secondary_Field_Contact__c,Secondary_Field_Email__c,Secondary_Field_Mobile__c,
                  Service_Partner_Start_Date__c,Service_Partner_End_Date__c,Service_Partner_Main_Phone__c,Trade__c,Supported_Trade__c  FROM Site_Service_Partner__c WHERE Site_Account__c =: acc.Id AND Trade__c includes('Land') OR Trade__c includes('Snow') AND Service_Partner_Site_Status__c = 'Active' ];

    
    Set<Id> bidId = new  Set<Id>();  
    for(Site_Service_Partner__c bs:sspList){
       bidId.add(bs.Id);
    }
     
   }

}




 
  • February 07, 2020
  • Like
  • 0
I created a visualforce and a apex class to display junction object child records on an account page. It is working as expected, but i was wonder how can update my apex class to allow the junction object child records to be updated from the account page? I'm not sure how to accomplish this so i am reaching out to the community to see if anyone could help me update my class to support this function. My VF page and class is below.

VF Page:
<apex:page standardController="Account" extensions="VF_SiteServicePartnerLandController" lightningStylesheets="true"  >


<style>
       th{ width: 50%;}       
   </style>
 
    <apex:form > 
  


     <apex:pageBlock >
    
        
        <apex:pageBlockTable cellpadding="5" width="100%" columns="2" value="{!sspList}" var="item">
 
           <apex:column >
           <apex:outputField value="{!item.Supported_Trade__c}"/><br></br>
           <apex:outputLabel value=""><b>Service Partner Assigned to Site</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Service_Partner__c}"/><br></br>
                <apex:outputLabel value=""><b>Service Partner Primary Contact</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Primary_Field_Contact__c}"/><br></br>
                <apex:outputLabel value=""><b>Primary Field  Cell</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Primary_Field_Mobile__c}"/><br></br>
                <apex:outputLabel value=""><b>Primary Field Email</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Primary_Field_Email__c}"/><br></br>
                <apex:outputLabel value=""><b>Secondary Contact</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Secondary_Field_Contact__c}"/><br></br>
                <apex:outputLabel value=""><b>Secondary Cell</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Secondary_Field_Mobile__c}"/><br></br>
                <apex:outputField value="{!item.Secondary_Field_Email__c}"/>
            
            </apex:column>
           
           
           <apex:column >
           
           <apex:outputLabel value=""><b>Service Partner Owner</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Service_Partner_Owner__c}"/><br></br>
                <apex:outputLabel value=""><b>Service Partner Owner Cell</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Service_Partner_Owner_Mobile__c}"/><br></br>
                <apex:outputLabel value=""><b>Service Partner Main Phone</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Service_Partner_Main_Phone__c}"/><br></br>
                <apex:outputLabel value=""><b>Service Partner Owner Email</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Service_Partner_Owner_Email__c}"/><br></br>
                <apex:outputLabel value=""><b>Service Provider Start Date</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Service_Partner_Start_Date__c}"/><br></br>
                <apex:outputLabel value=""><b>Service Provider End Date</b></apex:outputLabel><br></br>
                <apex:outputField value="{!item.Service_Partner_End_Date__c}"/>
            
            </apex:column>
            
      </apex:pageBlockTable>
   </apex:pageBlock>
 </apex:form>   
 </apex:page>

Apex Class:
// Used on the account page updated 1-31-2020
Public Class VF_SiteServicePartnerLandController{
   private Account acc;
   public List<Site_Service_Partner__c> sspList {get;set;}
   
   public VF_SiteServicePartnerLandController(ApexPages.StandardController sp){
       acc = (Account)sp.getRecord();
       sspList = new List<Site_Service_Partner__c>();
       sspList = [SELECT Id,Name,Site_Account__c,Primary_Field_Contact__c,Service_Partner__c,
                  Service_Partner_Owner__c,Service_Partner_Owner_Mobile__c,Service_Partner_Owner_Email__c,
                  Primary_Field_Email__c,Primary_Field_Mobile__c,Service_Partner_Site_Status__c, 
                  Contracted_Services__c,Secondary_Field_Contact__c,Secondary_Field_Email__c,Secondary_Field_Mobile__c,
                  Service_Partner_Start_Date__c,Service_Partner_End_Date__c,Service_Partner_Main_Phone__c,Trade__c,Supported_Trade__c  FROM Site_Service_Partner__c WHERE Site_Account__c =: acc.Id AND Site_Account__r.Trade__c includes('Land') AND Service_Partner_Site_Status__c = 'Active' ];

    
    Set<Id> bidId = new  Set<Id>();  
    for(Site_Service_Partner__c bs:sspList){
       bidId.add(bs.Id);
    }
     
   }

}

 
  • February 05, 2020
  • Like
  • 0
I am working on a flow wrapped in a lightning component as a global action and i am trying to figure out how to change the finish bahavior so the user is redirected to the home page. I came across these events ( force:navigateToObjectHome or force:navigateToUrl.) but I'm not sure where to used them in my lightning component. Any help with this would be greatly appreciated. My code is below for my component

Component:
<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickActionWithoutHeader" access="global" >

<aura:handler name="init"  value="{!this}" action="{!c.init}" />
<lightning:flow aura:id="flowData" />
</aura:component>

Controller:
 
({
init : function (component) {
// Find the component whose aura:id is "flowData"
var flow = component.find("flowData");
// In that component, start your flow. Reference the flow’s Unique Name.
flow.startFlow("New_IT_Support_Case");
   
},
})



 
  • January 10, 2020
  • Like
  • 0
I have an apex extension controller that i need to write a test class, but I'm not sure how to write a test class for this type of controller. Any help would be greatly appreciated. My code is below.
 
Public Class AccountExtensionController{
   private Account acc;
   public List<Bids_Sent__c> bidsList {get;set;}
   public Map<String,List<Site_Bid_Details__c>>  bidsMap {get;set;}
   public AccountExtensionController(ApexPages.StandardController sc){
       acc = (Account)sc.getRecord();
       bidsList = new List<Bids_Sent__c>();
       bidsList = [SELECT Id,IsAddedToPDF__c,Customer__r.Service_Agreement_Verbiage__c,Site__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Site__r.Customer_Location_ID__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c =: acc.Id AND IsAddedToPDF__c=true];
    
    Set<Id> bidId = new  Set<Id>();  
    for(Bids_Sent__c bs : bidsList){
       bidId.add(bs.Id);
    }
     
    bidsMap = new Map<String,List<Site_Bid_Details__c>> ();
    for(Site_Bid_Details__c bd : [SELECT Id, Bid_Name__r.Name,Site__c,Contract_Start_Month__c,Site__r.Customer_Location_ID__c,Cost__c,Customer__r.Contract_Month__c,Increment__c,Total__c,Price__c,Scope__c,Bid_Name__r.Service_Type__c,Number_of_Months__c,Retainer_Fee__c,Monthly_Payment__c,UOM__c  FROM Site_Bid_Details__c WHERE Bid_Name__c IN : bidId]){
        
        if(bidsMap.containsKey(bd.Bid_Name__r.Name)){
  System.debug('CONTAINS KEY: ' + bd.Bid_Name__r.Name);
  bidsMap.get(bd.Bid_Name__r.Name).add(bd);
} else { 
  System.debug('CREATE: ' + bd.Bid_Name__r.Name);
  bidsMap.put(bd.Bid_Name__r.Name,new List<Site_Bid_Details__c>{bd}); 
}
    } 

}

}

 
  • September 12, 2019
  • Like
  • 0
I was wondering if it is possible to acheive creating a visualforce page with using  apex:repeat that looks similar to my screenshot below. primarly I'm looking at the Payment Schedule section

User-added image
  • August 28, 2019
  • Like
  • 0
I have a visualforce page with apex:repeat and output panels. my issue is my page is displaying the same records twice and I'm not sure why. my code is below. Any help with this would be greatly appreciated.
User-added image
<apex:page standardcontroller="Account" renderas="pdf" extensions="AccountExtensionController" standardstylesheets="false" showheader="false" applyhtmltag="false">
<form >
<html xmlns="http://www.w3.org/1999/xhtml">
    <body style="color:#000000;border-style:solid; border-width:0px; width:85%; text-align:center">
    </body>

    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;text-align:left;"
               cellpadding="2">
            
            <tr>
                <td colspan="4" style="font-size:12px; font-weight: normal">
                </td>
            </tr>
            
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style:solid; border-width:1px;
                border-color:#000000;padding:3px;text-align:center;background-color:#B4C6E7">
                    SERVICE PARTNER DETAILS
                </td>
            </tr>

    </table>
            
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; text-align:left;"
               cellpadding="2">
            <tr>
                <td width="50%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px;padding-top:10px">
                    <b>Company</b> {!Account.Name}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="50%" align="right" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:#ffffff;font-style:normal; font-weight:normal;padding:3px;padding-top:10px">
                    <b>Office Phone</b> {!Account.Phone}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>Contact</b> {!Account.Primary_Field_POC__r.FirstName} {!Account.Primary_Field_POC__r.LastName} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:  #ffffff;font-style:normal; font-weight:normal;padding:3px"><b>Cell Phone</b> {!Account.Secondary_Phone__c}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>Street Address</b><br/> {!Account.BillingStreet}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:#ffffff;font-style:normal; font-weight:normal;padding:3px"><b>Fax</b> {!Account.Fax}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>City, St. Zip</b><br/> {!Account.BillingCity}, {!Account.BillingState} {!Account.BillingPostalCode}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color: #ffffff;font-style:normal; font-weight:normal;padding-bottom:10px"><b>Email</b> {!Account.Primary_Field_POC__r.Email}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style: solid; border-width:1px;
                border-color: #000000;padding:3px;padding:3px;text-align:center;background-color:#B4C6E7">PER PUSH FEE SERVICE AGREEMENT</td>
            </tr>
    </table>
            
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;  text-align:left;"
               cellpadding="4">
          
            <tr>
               
            <td width="50%" align="left" style="color: #000000;text-align:center; border-right-style: solid; border-right-width: thin;
                border-right-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">Per Push Fees: Includes all fees necessary to complete the services described in the scope of work for the event duration.  Hourly pricing applies only to extra services.
            </td>
            </tr>
    </table>
 
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;text-align:center;" cellpadding="2">
            
            <tr>
                <td colspan="4" style="font-size:12px; font-weight: normal">
                </td>
            </tr>
            
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style: solid; border-width:1px;
                border-color:#000000;padding:3px;background-color:#B4C6E7;">
                  Service Locations and Fees
                </td>
            </tr>
        <tr><td></td></tr>
    </table>
   
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; text-align:center;"
               cellpadding="0">
              
            <apex:repeat var="sd" value="{!bidsList}">
          
              <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central; font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">

                    <tr>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px; border-top-style:solid">Site Name</th>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px; border-top-style:solid">Service Period</th>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px;border-top-style:solid">Address</th>
                    </tr>

                   </apex:outputPanel>
                 
                <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central;font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">
                   
                    <tr>
                       
                        <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"> {!sd.Customer__r.Name }</apex:outputPanel> </td>
                       
                       <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"> <apex:outputText value="{0, date, MMMM d','  yyyy}">
                        <apex:param value="{!sd.Customer__r.Contract_Start_Date__c}" /> </apex:outputText>Seasonal<apex:outputText value="{0, date, MMMM d','  yyyy}"><apex:param value="{!sd.Customer__r.Contract_End_Date__c}" /></apex:outputText>

                </apex:outputPanel></td>

                       <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}">{!sd.Site__r.BillingStreet}<br/>{!sd.Site__r.BillingCity}, {!sd.Site__r.BillingState} {!sd.Site__r.BillingPostalCode} </apex:outputPanel></td>

                    </tr>

                </apex:outputPanel>
                
               
                       <apex:repeat var="et" value="{!bidsMap[sd.Name] }" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"    >
    
                           <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central;font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">
                   <tr>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid">Month</th>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid"></th>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid">Monthly Payment</th>
                      
                   </tr>

                   
    </apex:outputPanel>
        
            
            <apex:outputPanel layout="none" rendered="{!IF(et.Contract_Start_Month__c = 'January' && sd.IsAddedToPDF__c =true  ,true,false)}">
         <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jan-20</td>
                            
                            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>

            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 2 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Feb-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 3 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Mar-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 4 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Apr-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 5 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-May-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
           

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 6 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jun-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
          

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 7 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jul-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 8 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Aug-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 9 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Sep-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 10 && sd.IsAddedToPDF__c =true  ,true,false)}">

        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Oct-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText> </td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 11 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Nov-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 12 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Dec-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
        </apex:outputPanel>
             
             <apex:outputPanel layout="none" rendered="{!IF( sd.IsAddedToPDF__c =true  ,true,false)}" style="font-family: Arial, Helvetica, sans-serif; text-align:center;">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:right;background-color:#f2f2f2;width:33%; text-align:center">Retainer Fee</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:20%"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:25%"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Retainer_Fee__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
            
            <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="font-family: Arial, Helvetica, sans-serif; text-align:center;">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:40%"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><b>Total&#58; &nbsp;</b><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Total__c}" /> </apex:outputText></td>
        </tr>
             
           
        </apex:outputPanel>
           </apex:repeat>
           </apex:repeat>
        </table>
     </html>
</form>

</apex:page>

 
  • August 13, 2019
  • Like
  • 0
I have an interesting problem that i cant seemed to figure out.
I am trying to create a visualforce page pdf with one or apex:repeat components.
I wuold like to create a pdf from the account object that displays related records to the account object and also child record information that is associated to the related record of the account.

I tried creating the following code but i am getting an error.

Error: Unknown property 'VisualforceArrayList.Bid_Deliverables__r'


the first Apex:Repeat gets the related records to the account, the second should return the related records to the related object to the account. I'm not sure if this can be done. Any help would be greatly appreciated. 



 
<apex:page standardcontroller="Account" renderas="pdf" standardstylesheets="false" showheader="false" applyhtmltag="false">
<form >
<html xmlns="http://www.w3.org/1999/xhtml">
    <body>
    </body>
    
 <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; border-collapse: collapse;  text-align:center;"
               cellpadding="2">
            
<apex:repeat var="sd" value="{!Account.Bids_Sent4__r}">
                   
<tr>
<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr"> {!sd.Name}</td>

<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr">${!sd.Site__r.Name}</td></tr>

<apex:repeat var="et" value="{!Account.Bids_Sent4__r.Bid_Deliverables__r}"  >
<tr>
<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr"> {!et.Scope__c} {!et.Increment__c}</td>

<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr">${!et.Price__c}</td>

<td style="border-bottom:solid;border-bottom-color:#000000;border-bottom-width:1px;" class="ctr">${!et.Bid_Name__r.Name}</td>
</tr>
  </apex:repeat>
</apex:repeat>
</table></html>
</form>
</apex:page>




 
  • July 30, 2019
  • Like
  • 0
Hi there,

In Lightning Flow, I want to open case record detail page after finish my screen Flow.

To solve this, I added Lightning Component to Last Screen of my Flow.
Is it good idea to implement it or not?
Is there other ways to do this, please let me share.
<aura:component implements="lightning:availableForFlowScreens,lightning:availableForFlowActions">
    <aura:attribute name="recordId" type="String" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>    
</aura:component>
 
({    
    doInit: function(component, event, helper) {
        // Get the record ID attribute
        var record = component.get("v.recordId");
        
        // Get the Lightning event that opens a record in a new tab
        var redirect = $A.get("e.force:navigateToSObject");
        
        // Pass the record ID to the event
        redirect.setParams({
            "recordId": record
        });
        
        // Open the record
        redirect.fire();
    }
})

Regards,
LinThaw