• John Neff
  • NEWBIE
  • 335 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 69
    Questions
  • 91
    Replies
Hi,

I am looking to bulk delete all records that I have added to my custom object. Could someone please suggest a way that I can do this?

Thanks, Emma
Hello, 

I'm trying to add an additional recipient/role to a Docusign envelope (role "F" below)- but somehow that recipient is getting pushed to Signing Order 2 despite having the routing order attribute set to 1 in the button logic. 

I can't figure out what I'm missing here, can anybody help? 
 
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';

var CRL = 'Email~{!Client_Order__c.Primary_Invoice_Email__c};FirstName~{!Client_Order__c.PIR_First_Name__c};LastName~{!Client_Order__c.PIR_Last_Name__c};Role~A;RoutingOrder~1,Email~{!Client_Order__c.Secondary_Invoice_Email__c};FirstName~Viewer;Role~B;RoutingOrder~1,Email~roleD@email.com;FirstName~Dude;LastName~Abides;Role~D;RoutingOrder~1,Email~roleE@email.com;FirstName~Johnny;LastName~Onthespot;Role~E;RoutingOrder~1,Email~roleF@email.com;FirstName~Jimmy;LastName~Buffet;Role~F;RoutingOrder~1'; 
var CCRM = 'A~Signer 1;B~CC1;D~R2M1;E~R2M2;F~R2M3'; 
var CCTM = 'A~Signer;B~Carbon Copy;D~Carbon Copy;E~Carbon Copy;F~Carbon Copy'; 

var CES='Please DocuSign Inv. {!Client_Order__c.Name} for {!Client_Order__c.Buyer_Name__c}';
var CEM='Please review and sign your Ring2Media Order.  Thank you.' 

var DST='f610482c-4082-4ffb-af23-2d13962e64ae';



window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Client_Order__c.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;

Thanks so much!

John
Hello, 

I am working on a LEX rollout at my company and have created a table that is displayed on the home page.  I followed the guidelines here to style the table: https://www.lightningdesignsystem.com/components/data-tables and was succesful for the most part- except my table rows are displaying at twice the height that they should be.   

Is there a problem with my page markup that is causing this?  I am trying to make my table look identical to the one here: https://www.lightningdesignsystem.com/components/data-tables

Here is my page: 
 
<apex:page controller="WeeklyOweController" lightningStylesheets="true">
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="x-ua-compatible" content="ie=edge" />
  <title>Salesforce Lightning Design System Trailhead Module</title>
  <meta name="viewport" content="width=device-width, initial-scale=1" />

  <!-- Import the Design System style sheet -->
  <apex:slds />
</head>
<body>

<div class="slds-scope">

<b>Post-Pays</b>
<table class="slds-table slds-table_bordered slds-table_cell-buffer">  
<thead>
<tr class="slds-text-title_caps">
<th scope="col"><div class="slds-truncate" title="Buyer Name">Buyer Name</div></th> 
<th scope="col"><div class="slds-truncate" title="Age">Age</div></th> 
<th scope="col"><div class="slds-truncate" title="Funds Due">Funds Due</div></th>  
<th scope="col"><div class="slds-truncate" title="Account Balance">Account Balance</div></th></tr>
</thead>
<tbody>
 <apex:variable var="TotalOwe" value="{!0}"/>
<apex:repeat value="{!listOfPost}" var="pst">
<tr>
<td>  <div class="slds-truncate" title="BuyerNameVal">{!LEFT(pst.Buyer_Name__c,35)}</div> </td> 
<td> <div class="slds-truncate" title="DaysOpenVal">{!pst.Days_Open__c}</div></td> 
<td> <div class="slds-truncate" title="BalanceCollVal"> $<apex:outputText value="{0, number, #,###}"> <apex:param value="{!ROUND(pst.Balance_to_Collect__c,0)}"/> </apex:outputText> </div></td>  
<td style="{!if(pst.AcctBal__c < 0,'color: #D84D44','color: #040404')}"><div class="slds-truncate" title="AcctBalVal"> $<apex:outputText value="{0, number, #,###}"> <apex:param value="{!ROUND(pst.AcctBal__c,0)}"/> </apex:outputText></div></td>
</tr>
<apex:variable var="TotalOwe" value="{!TotalOwe+pst.Balance_to_Collect__c}"/>
</apex:repeat>
<tr>
<td><div class="slds-truncate" title="TotalDue"><b>Total Due:</b>  </div></td> 
<td><div class="slds-truncate" title="Spacer1"> </div></td> 
<td><div class="slds-truncate" title="TotalDueVal"> <apex:outputText style="font-weight:800" value="${0, number}"> <apex:param value="{!TotalOwe}" />    </apex:outputText></div> </td>  
<td><div class="slds-truncate" title="Spacer2"> </div></td></tr>
   </tbody>
</table>   
<br/>
<br/>
<b>Pre-Pays</b>
<table class="slds-table slds-table_bordered slds-table_cell-buffer">  
<thead>
<tr class="slds-text-title_caps">
<th scope="col"><div class="slds-truncate" title="Buyer Name">Buyer Name</div></th> 
<th scope="col"><div class="slds-truncate" title="Age">Age</div></th> 
<th scope="col"><div class="slds-truncate" title="Funds Due">Funds Due</div></th>  
<th scope="col"><div class="slds-truncate" title="Account Balance">Account Balance</div></th></tr>
</thead>
<apex:variable var="TotalPre" value="{!0}"/>
<apex:repeat value="{!listOfPre}" var="pre">
<tr>
<td> <div class="slds-truncate" title="BuyerName2"> {!pre.Buyer_Name__c}</div> </td> 
<td><div class="slds-truncate" title="Age2">{!pre.Days_Open__c}</div></td> 
<td><div class="slds-truncate" title="BalColl2"> $<apex:outputText value="{0, number, #,###}"> <apex:param value="{!ROUND(pre.Balance_to_Collect__c,0)}"/></apex:outputText></div></td>
<td style="{!if(pre.AcctBal__c < 0,'color: #D84D44','color: #040404')}"><div class="slds-truncate" title="AcctBal2">  $<apex:outputText value="{0, number, #,###}"> <apex:param value="{!ROUND(pre.AcctBal__c,0)}"/> </apex:outputText></div></td>
</tr>
<apex:variable var="TotalPre" value="{!TotalPre+pre.Balance_to_Collect__c}"/>
</apex:repeat>
<tr>
<td><div class="slds-truncate" title="GrandTotal2"><b>Total Due:</b>  </div></td> 
<td><div class="slds-truncate" title="Spacer3"> </div></td> 
<td><div class="slds-truncate" title="TotalVal2"><apex:outputText style="font-weight:800" value="${0, number}"> <apex:param value="{!TotalPre}" />   </apex:outputText> </div></td>  
<td><div class="slds-truncate" title="Spacer4"> </div></td></tr>
</table> 
</div>
</body> 
</html>
</apex:page>


I would really appreciate any help! 

Thanks, 

John 

Good Evening, 

I am using AggregateResult and GROUP BY ROLLUP to output some data.  After a long slog, I've got it working the way I need it to... except for one thing.  The "Total" row is showing at the top of the list instead of the bottom when I put the data into a table. 

Would anybody be able to help me get my total row so that it is the last item in the table?

Here is my VF page: 
<apex:page controller="CurrentWeekDY">
 
 <apex:pageBlock title="Delivery WTD">
 <apex:pageBlockTable value="{!DelSumOut}" var="dy">
   <apex:column value="{!dy.Campaign}" headerValue="Campaign" />
   <apex:column value="{!dy.Delivery}" headerValue="Delivery" />  
 
 </apex:pageBlockTable>
 </apex:pageBlock>
 
 

And here is my controller: 
public class CurrentWeekDY {
    public class DelSum {
        public String Campaign {get; set;}
        public String Delivery {get; set;}

        public DelSum(string c, string d) {
            this.Campaign = c;
            this.Delivery = d;
        }
    }

    public List<DelSum> DelSumList = new List<DelSum>();

    public List<DelSum> getDelSumOut() {
        AggregateResult[] AgR = [SELECT Camp__c, SUM(Spend__c) FROM TL_Client__c WHERE CWDelivery__c = TRUE GROUP BY ROLLUP(Camp__c) ORDER BY Camp__c];

        for (AggregateResult DYList : AgR) {
            DelSumList.add(new DelSum(String.valueOf(DYList.get('Camp__c')), String.valueOf(DYList.get('expr0'))));
        }

        return DelSumList;
    }
}


I would really appreciate any help!!

Thanks, 
 

John 

Hello,

I am trying to use AggregateResult to build a controller for a VF page.  This is the fist time that I am using this function and am recieving the error: 
Error: Compile Error: Missing '<EOF>' at 'public' at line 10 column 1

I have googled this like crazy, and seem to understand that it is because I have markup outside of the wrapper but I still can't understand how to fix it?  Can anyone help?

Here is my class: 
 
public class CurrentWeekDY{
    String Campaign {get; set;}
    String Delivery {get; set;}
        public DelSum(string c, string d){
        this.Campaign=c;
        this.Delivery=d;
        
    }
}
public List<DelSum> DelSumList = new List<DelSum>();

public List<DelSum> getDelSumOut(){

    AggregateResult[] AgR = [SELECT Campaign_TL__c, SUM(Spend__c) FROM TL_Client__c WHERE CWDelivery__c = TRUE GROUP BY Campaign_TL__c ORDER BY Campaign_TL__c]; 
    for (AggregateResult DYList : AgR) { 
        DelSumList.add(new DelSum(String.valueOf(DYList.get('Campaign_TL__c')), String.valueOf(DYList.get('expr0')), String.valueOf(DYList.get('expr1'))));
    }
    return DelSumList;
}

Thank you so much for any help!

John 

Hello, 
 

I am trying to build a "Copy To Clipboard" button for one of my VF pages. 

I found the code below on GitHub (will attribute author at bottom), but it displays the text to be copied in an output field.  The functionality works just as I want it to, but I don't want to display the text, I just want to store it behind the button.  Can anyone help me convert the OutPutPanel portion to a stored variable?  I've been playing around with this for a while and can't figure it out. 

Here is the code: 
 

<apex:page title="Clipboard Test" >
<apex:messages />
    <script language="JavaScript">
        function ClipBoard(copytextid, holdtextid){
            copyToClipboard(copytextid);
        }
        function copyToClipboard(elementId) {
          // Create an auxiliary hidden input
          var aux = document.createElement("input");
          // Get the text from the element passed into the input
          aux.setAttribute("value", document.getElementById(elementId).innerHTML);
          // Append the aux input to the body
          document.body.appendChild(aux);
          // Highlight the content
          aux.select();
          // Execute the copy command
          document.execCommand("copy");
          // Remove the input from the body
          document.body.removeChild(aux);
        }    
    </script>   
    <apex:pageblock >
    <apex:form >
        <apex:outputpanel ID="copytext" STYLE="height:150;width:162;background-color:pink">
            TEXT TO BE COPIED
        </apex:outputpanel> 
        <apex:inputtextarea ID="holdtext" STYLE="display:none;"></apex:inputtextarea>
        <apex:commandbutton onClick="ClipBoard('{!$Component.copytext}', '{!$Component.holdtext}');" rerender="copytext" value="Copy to Clipboard"/> 
    </apex:form>
    </apex:pageblock>
</apex:page>
**Source: https://gist.github.com/nithesh1992/dc66708bde9ab94313a731a715fef9ad#file-copy-txt

I want to accomplish something like this:
 
<apex:variable ID="copytext" value="TEXT TO BE COPIED" "/>
            
      
        <apex:inputtextarea ID="holdtext" STYLE="display:none;"></apex:inputtextarea>
        <apex:commandbutton onClick="ClipBoard('{!$Component.copytext}', '{!$Component.holdtext}');" rerender="copytext" value="Copy to Clipboard"/>

So that the only visable piece is the button.  Can anyone help me with this?!

Thank you, and happy thanksgiving!
Hello, 

I am trying to write a test class for a VF controller, and I am getting an error saying the variable does not exist even though it does!  Why would this be happening? 

Here is my controller: 
 
public class DailySalesReportController{ 

        public List<Opportunity> listOfCefOpToday {get;set;}
        public List<Opportunity> listOfLoganOpToday {get;set;}
        public List<Lead> listOfCefLdToday {get;set;}
        public List<Lead> listOfLoganLdToday {get;set;}
        public List<Sales_Meetings__c> listOfCefSkedToday {get;set;}
        public List<Sales_Meetings__c> listOfLoganSkedToday {get;set;}
        public List<Sales_Meetings__c> listOfCefOcToday {get;set;}
        public List<Sales_Meetings__c> listOfLoganOcToday {get;set;}
        public Opportunity CefOpToday {get;set;}
        public Opportunity LoganOpToday {get;set;}
        public Lead CefLdToday {get;set;}
        public Lead LoganLdToday {get;set;}
        public Sales_Meetings__c CefSkedToday {get;set;}
        public Sales_Meetings__c LoganSkedToday {get;set;}
        public Sales_Meetings__c CefOcToday {get;set;}
        public Sales_Meetings__c LoganOcToday {get;set;}
    
    public DailySalesReportController(){
        listOfCefOpToday = [Select id, name from Opportunity WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Jeff Cefalu'];
        listOfLoganOpToday = [Select id, name from Opportunity WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Logan Connolly'];
        listOfCefLdToday = [Select id, name from Lead WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Jeff Cefalu'];
        listOfLoganLdToday = [Select id, name from Lead WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Logan Connolly'];
        listOfCefSkedToday = [Select id, name from Sales_Meetings__c WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Jeff Cefalu'];
        listOfLoganSkedToday = [Select id, name from Sales_Meetings__c WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Logan Connolly'];
        listOfCefOcToday = [Select id, name from Sales_Meetings__c WHERE Occurred_Today__c = TRUE AND Owner_Name__c = 'Jeff Cefalu'];
        listOfLoganOcToday = [Select id, name from Sales_Meetings__c WHERE Occurred_Today__c = TRUE AND Owner_Name__c = 'Logan Connolly'];
        
        
}
}

And here is my test: 
 
@isTest(seeAllData = true)
public class DailySalesReportControllerTest{
    // Unit test Method
    static testmethod void UnitTest() {
        //Create your Opportunity record with required field
        //Opportunity b = new Opportunity(Created_Today__c = TRUE);
        //insert b;
        test.startTest();
           DailySalesReportControllerTest ub = new DailySalesReportControllerTest();
           
           if(ub.listOfCefOpToday!=null && !ub.listOfCefOpToday.isEmpty())
           Opportunity cefOpportunity = ub.listOfCefOpToday.get(0);
           
           if(ub.CefOpToday !=null)
            String CefOpTodayId = ub.CefOpToday.Id;
           
        test.stopTest();
    }   
}

I keep getting this error: 
 
Error: Compile Error: Variable does not exist: listofcefoptoday at line 12 column 41

Can anyone help?  I'm really stuck here 
Hello, 

I have an apex class that functions as a VF page controller, and when I run the associated test class it passes - but when I look at the class the coverage is at 0% and it is bringing my code coverage down below 75%.  How can this be?  I would really appreciate some help here!

Here is my controller: 
 
public class R2MBizBookController{

    public List<Buyer__c> listOfDeck {get; set;}
    public List<Buyer__c> listOfNewThirty {get; set;}
    public List<Buyer__c> listOfNewTW {get; set;}
    public List<Buyer__c> listOfLegacy {get; set;}
    public List<Buyer__c> listOfTQ {get; set;}
    public List<Buyer__c> listOfAQ {get; set;}
    public List<Buyer__c> listOfBQ {get; set;}
    public List<Buyer__c> listOfCQ {get; set;}
    public List<Buyer__c> listOfDQ {get; set;}
    public List<Buyer__c> listOfEQ {get; set;}
    public Buyer__c Live {get; set;}
    public Buyer__c NewTW {get; set;}
    public Buyer__c Viability {get; set;}
    public Buyer__c LaunchPad {get; set;}
    public Buyer__c TQ {get; set;}
    public Buyer__c AQ {get; set;}
    public Buyer__c BQ {get; set;}
    public Buyer__c CQ {get; set;}
    public Buyer__c DQ {get; set;}
    public Buyer__c EQ {get; set;}
   
public R2MBizBookController() {
    listofDeck = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Commitment_c__c from Buyer__c WHERE Pipeline_Status__c = 'OnDeck' ORDER BY Name ASC];
    listofNewThirty = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'New 30' ORDER BY Sales_Origination_Date__c DESC];
    listofNewTW = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE  New_Live__c = TRUE  ORDER BY Sales_Origination_Date__c DESC];
    listofLegacy = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'Legacy' ORDER BY  Sales_Origination_Date__c DESC];
    listofTQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE TQ_Pipeline__c = TRUE ORDER BY  Sales_Origination_Date__c DESC];
    listofAQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'AQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofBQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'BQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofCQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'CQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofDQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'DQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofEQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'EQ' ORDER BY  Sales_Origination_Date__c DESC];
   


}
}

and here is my test class: 
 
@isTest(seeAllData =  true)
public class R2MBizBookControllerTest{
    // Unit test Method
    static testmethod void UnitTest() {
        //Create your buyer record with required field
        //Buyer__c b = new Buyer__c(Pipeline_Status__c = 'Legacy');
        //insert b;
        test.startTest();
           R2MBizBookController ub = new R2MBizBookController();
        test.stopTest();
    }   
}

I ill be eternally grateful if someone can help me solve this!

Thank you, 

John
Hello, 

I have a controller that is showing 0% code coverage, but I'm not sure why my test class isn't covering anything.  Can anyone help? 

Here is my controller: 
 
public class R2MBizBookController{

    public List<Buyer__c> listOfDeck {get; set;}
    public List<Buyer__c> listOfNewThirty {get; set;}
    public List<Buyer__c> listOfNewTW {get; set;}
    public List<Buyer__c> listOfLegacy {get; set;}
    public List<Buyer__c> listOfTQ {get; set;}
    public List<Buyer__c> listOfAQ {get; set;}
    public List<Buyer__c> listOfBQ {get; set;}
    public List<Buyer__c> listOfCQ {get; set;}
    public List<Buyer__c> listOfDQ {get; set;}
    public List<Buyer__c> listOfEQ {get; set;}
    public Buyer__c Live {get; set;}
    public Buyer__c NewTW {get; set;}
    public Buyer__c Viability {get; set;}
    public Buyer__c LaunchPad {get; set;}
    public Buyer__c TQ {get; set;}
    public Buyer__c AQ {get; set;}
    public Buyer__c BQ {get; set;}
    public Buyer__c CQ {get; set;}
    public Buyer__c DQ {get; set;}
    public Buyer__c EQ {get; set;}
   
public R2MBizBookController() {
    listofDeck = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Commitment_c__c from Buyer__c WHERE Pipeline_Status__c = 'OnDeck' ORDER BY Name ASC];
    listofNewThirty = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'New 30' ORDER BY Sales_Origination_Date__c DESC];
    listofNewTW = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE  New_Live__c = TRUE  ORDER BY Sales_Origination_Date__c DESC];
    listofLegacy = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'Legacy' ORDER BY  Sales_Origination_Date__c DESC];
    listofTQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE TQ_Pipeline__c = TRUE ORDER BY  Sales_Origination_Date__c DESC];
    listofAQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'AQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofBQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'BQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofCQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'CQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofDQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'DQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofEQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'EQ' ORDER BY  Sales_Origination_Date__c DESC];
   
and here is my test: 

}
}
and here is my test? 
 
@isTest(seeAllData = false)
public class R2MBizBookControllerTest{
    // Unit test Method
    static testmethod void UnitTest() {
        //Create your buyer record with required field
        //Buyer__c b = new Buyer__c(Pipeline_Status__c = 'Legacy');
        //insert b;
        test.startTest();
           R2MBizBookController ub = new R2MBizBookController();
        test.stopTest();
    }   
}

would anyone be willing to help me beef this up?

it would mean the world to me. 

thank you in advance!!!!!!

John 
 

Hello, 

I am attempting to use inputText on a VF page and can't figure out how to save the value to the record.  Does anyone have an example of this that I could bootstrap off of? 

I am using a custom object & controller. 
 

Here is the string from the VF page: 
 

apex:inputText value="{!spotObj.Workload__c}"/> <apex:commandButton value="Save" action="{!saveSpot}"/>
And here is my controller: 
 
public with sharing class SpotsInProcess{

    public List <Job_Number__c> listOfInProgress {get;set;}
    public Job_Number__c InProgress  {get;set;}

public PageReference saveSpot(){
    UPDATE listOfInProgress;
    return null;
    }


public SpotsInProcess(){
    listOfInProgress = [Select id, name, Workload__c, Notes__c, Thumbnail_URL__c, ISCI__c, Title__c,   First_Air_Date__c,  Last_Air_Date__c, Project__c, Campaign__r.Name, Nets_Running__c, View_Link__c, Internal_Title__c, Legal__c, Airing_Agencies__c from Job_Number__c where Job_Status__c = 'In Progress']; 
}
}

It would mean the world to me if someone could help me out!

Thanks in advance! 
 
Hello, 

I am using apex:outputLink on a vf page to open a new window - but it is refreshing my original page upon click.  Is there a way to stop this?  Here is my link. 
 
<apex:outputLink onclick="window.open('AllSpotsMoreDetails?id={!spotObj.Id}', 'newwindow', 'width=800, height=900')"> More Details</apex:outputLink>

Thanks, 

John

 
Hello, 

I am having trouble with In-line edit functionality that I developed 6 months ago or so... at some point in the past couple of weeks it has stopped working.  Has there been some sort of update or something that would cause a piece of functionality to just stop working?  Here is an example of a place where I am using inline edit: 

on VF page: 
<apex:form > 
           <apex:pageBlock title="Qualified" mode="inlineedit">
             <table cellpadding="5" style="border-collapse: collapse;table-layout:fixed" width="1120" border="1">
                <tr>
                      
                </tr>
                <apex:variable var="QualRev" value="{!0}"/>
                <apex:repeat value="{!listOfQualified}" var="qd">
                                                                         <tr >
                                  
                            
                              
                            <td width="450">
                                <apex:outputField value="{!qd.Next_Step__c}" >
                                     <apex:inlineEditSupport event="ondblclick" showOnEdit="saveButton, cancelButton" />
                                </apex:outputField>
                            </td>
                
                                                   
                            

                        </tr>
                               
            </table> 
            <apex:commandButton action="{!saveQD}" value="Update Opptys"/>
            </apex:pageBlock>
           </apex:form>

and on my controller: 
 
public PageReference saveQD(){
    UPDATE listOfQualified;
    return null;
    }

This setup worked for months - but then stopped.  I can't figure out why! Can anyone help? 

Thanks, 

John
 
Hello, 

I have a vf page (version 35.0) and controller with inline edits on one of my output fields, and my edits are not saving for some reason. 

Here is the pageblock where the inline edit resides: 
<apex:form >
    <apex:pageBlock title="{!camp}">
     <table width="1130" style="table-layout:fixed" align="left" >
   <tr>
   <td width="205" style="background-color: #D8D8D8; color: #190707"><b>Thumb</b></td>
   <td width="100" style="background-color: #D8D8D8; color: #190707"><b>ISCI</b></td>
   <td width="150" style="background-color: #D8D8D8; color: #190707"><b>First Aired - Last Aired</b></td>
   <td width="100" style="background-color: #D8D8D8; color: #190707"><b>Aired by</b></td>
   <td width="500" style="background-color: #D8D8D8; color: #190707"><b>Notes</b></td>
   <td width="300" style="background-color: #D8D8D8; color: #190707"><b>Viewer</b></td>
   <td width="100" style="background-color: #D8D8D8; color: #190707"><b>More Details</b></td>
   
   
      </tr> 
      
      </table>

     <apex:repeat value="{!SPOT}" var="spotObj"> 

        <apex:outputPanel rendered="{!IF(camp=spotObj.Campaign__r.Name,true,false)}" >
     <table width="1130" style="table-layout:fixed" align="left">
      
  <tr>
    <td width="205"> <img src="{!spotObj.Thumbnail_URL__c}" WIDTH="200" HEIGHT="120" onclick="window.open('{!spotObj.View_Link__c}', 'newwindow', 'width=500, height=500')"> </img> </td>
    <td width="100">{!spotObj.ISCI__c}<br/></td>
     <td width="150"></td>
      <td width="100"></td>
    <td width="500"> <apex:outputField value="{!spotObj.Notes__c}" >
                                     <apex:inlineEditSupport event="ondblclick" showOnEdit="saveButton, cancelButton" />
                                </apex:outputField></td>      
    <td width="300">{!spotObj.View_Link__c}</td>  
    <td width="100"><apex:outputLink onclick="window.open('AllSpotsMoreDetails', 'newwindow', 'width=800, height=900')"> More Details</apex:outputLink></td> 
    
    </tr>
  
</table>
             </apex:outputPanel>

      </apex:repeat>
      
       
    </apex:pageBlock>
    <apex:commandButton action="{!saveNotes}" value="Update Notes"/> 
</apex:form>


The field Notes__c is a Rich Text area field. 

Here is my controller: 
 
public with sharing class AllSpotController
{

public List <Job_Number__c> SPOT {get;set;}
public list<String> campaigns {get;set;}

public PageReference saveNotes(){
    UPDATE SPOT;
    return null;
    }

public void load() 
{
  campaigns= new List<String>();
  SPOT = [Select id, name, Notes__c, Thumbnail_URL__c, ISCI__c, Title__c, Project__c, Campaign__r.Name, Nets_Running__c, View_Link__c, Internal_Title__c, Legal__c, Airing_Agencies__c from Job_Number__c where ISCI__c <> null];
  
  Set<String> campaignSet = new Set<String>();
  for (Job_Number__c j : SPOT)
      campaignSet.add(j.Campaign__r.Name);
      
      for (String campaign : campaignSet) 
      {
            campaigns.add(campaign);
      }
      campaigns.sort();
    }
}

I have used this type of setup in the past successfully, what am I missing to make this not work? 


 
Hello, 

I am trying to create a custon button for Docusign and add a few parameters, but they don't seem to be doing anything.  

I know this borders on Answers Community vs. Developer Forum -  but I figure its worth a shot.  Here is what I have so far: 
 
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")} 
CES='CUSTOM SUBJECT'; 
DST='f610482c-4082-4ffb-af23-2d13962e64ae'; 
DocuSign_CreateEnvelope();


The button is creating a Docusign envelope as it should be, but the two parameters I added: "CES" and "DST" (these are parameters supplied by docusign)  are not doing anything. 

Is my syntax for adding parameters to my button correct? 

Thanks, 

John
Hello, 

I have an external vendor that is posting custom object records into my org via a SOAP POST request, and I am running into an issue where the vendor is not recieving a "Success" respone on a large number of the posts - yet the post is completing successfully. 

This is causing an issue because without a "Success" response, the post times out on the vendor side and they retry so I am ending up with a huge amount of duplicates. 

The problem here is that I have absolutely no idea how to diagnose this.  Is there somewhere where I can monitor the flow of records into my org and understand why some response messages aren't firing?  I don't even know where to start here, I would really appreciate some help. 

Thank you so much in advance. 

Regards, 

John
Hello, 

I have a VF page that is using apex:repeat to create a table column for each related object record like so:
 
<apex:repeat value="{!Quarterly_Buy__c.Media_Buys__r}" var="buys">
                     <td style="background-color: #D8D8D8; color: #190707;font-size:14px;" align="center">
                        <b>{!MONTH(buys.Broadcast_Week__c)}/{!DAY(buys.Broadcast_Week__c)}/{!VALUE(RIGHT(TEXT(YEAR(buys.Broadcast_Week__c)),2))}</b>
                    </td>

I want to add a condition where a column is only renedered if the field "Broadcast_Week__c" on the child record is greater than Today. 

I have adding a "Display" attribute to the td saying: 
 
display: {!IF(Quarterly_Buy__c.Media_Buys__r.Broadcast_Week__c < Today(), 'none', 'table-column')};"

but I am getting en error. 

Can anyone help? 

Thanks, 

John
Hello, 

I am working on creating a Contract template in visualforce, and I have to display a few numbered lists.  I am using a seperate outputtext for each item in the list, like so: 
 
<apex:outputText >
A.  Item A and corresponding text, this could wrap into a second, third, fourth, etc line.  How can I make the lines indent?
</apex:outputText>
<br/>
<br/>
<apex:outputText >
B.  Item B and corresponding text, this could wrap into a second, third, fourth, etc line.  How can I make the lines indent?
</apex:outputText>
<br/>
<br/>
<apex:outputText >
C.  Item C and corresponding text, this could wrap into a second, third, fourth, etc line.  How can I make the lines indent?
</apex:outputText>
<br/>
<br/>
<apex:outputText >
D.  Item D and corresponding text, this could wrap into a second, third, fourth, etc line.  How can I make the lines indent?
</apex:outputText>

How do I specify that when the text wraps on to a second line, it becomes indented? 

Thanks in advance!

John
Hello, 

I have a junction object called "Vendor Agreement" that is a junction between my Campaigns and a custom field object called "Vendors". 

I am trying to create a VF page that is laid out like a grid - where the Campaigns are the columns and the Vendors are the rows, and data from each Junction object populates in each cell.  For example if column 2 was the campaign "Widgets" and Row 2 was the vendor "Acme", I want to pull data from the Junction Object that exists between "Acme" and "Widgets" into Row 2, Column 2.  

Here is what I have so far, I just can not figure out how to render the data so that data is only displayed if on the Vendor Agreement object the "Vendor" lookup matches the value in column 1, and  the "Campaign" lookup matches the value in row 1. 

Am I even a little bit on the right track? 

Here is my controller: 
 
public class piPricingController{ 

    public List<Campaign> listOfOffers {get; set;}
    public List<PI_Vendor__c> listOfVendors {get; set;}
    public Campaign Offers {get; set;}
    public PI_Vendor__c Vendors {get; set;}
    
    public PageReference saveOF(){
    UPDATE listOfOffers;
    return null;
    }

public piPricingController(){ 
    listOfOffers = [Select id, name, (Select id, name, Partner_Name__c, Price_per_Call__c, Charge_Time_Threshold__c, Status__c  FROM Vendor_Addenda__r WHERE Vendor_Type__c = 'PI Vendor') FROM Campaign WHERE isActive = TRUE ORDER BY Name ASC];
    listOfVendors = [Select id, Name, (Select id, name, Partner_Name__c, Price_per_Call__c, Charge_Time_Threshold__c, Status__c  FROM Vendor_Addeda__r WHERE Vendor_Type__c = 'PI Vendor') FROM PI_Vendor__c WHERE Type__c = 'PI Vendor' ORDER BY Name Asc];

}
}

and here is my page: 
 
<apex:page controller="piPricingController">
<html>
<table cellpadding="5" style="border-collapse: collapse;table-layout:fixed" border="1">
<tr width="450">
<td width="450"> </td>
<apex:repeat value="{!listOfOffers}" var="a">
<td width="450"> {!a.name}</td>
</apex:repeat>
</tr>
<apex:repeat value="{!listOfVendors}" var="v">
<tr>
<td width="450">{!v.name} </td>
<apex:repeat value="{!listOfOffers}" var="va">
<td width="450">DATA RENDERED IF VENDOR MATCHES VALUE IN COLUMN 1 AND CAMPAIGN MATCHES DATA IN ROW 1 </td>
</apex:repeat>
</tr>
</apex:repeat>
</table>
</html>
</apex:page>


 
Hello, 

I am trying to add UPDATE functionality to a controller and am getting the error: DML requires SObject or SObject list type: List<String>

However my variable is set up like this: public List<String> campaigns {get;set;}

I am not sure how to achieve the proper syntax here, and was hoping that someone out there in developerland would be able to help me!

Here is my (broken) controller: 
 
public with sharing class QualOpController
{

public List <Opportunity> listOfOpty {get;set;}
public List<String> campaigns {get;set;}

public PageReference saveOp(){
    UPDATE campaigns;
    return null;
    }

 public String getName(){
        return 'QualOpController';
        }

public void load() 
{
  campaigns= new List<String>();
  listOfOpty = [Select id, name, CreatedDate, StageName, Vert_Med__c, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE Pipeline_Oppty__c = TRUE ]; 
  
  Set<String> campaignSet = new Set<String>();
  for (Opportunity j : listOfOpty)
      campaignSet.add(j.Vert_Med__c);
      
      for (String campaign : campaignSet) 
      {
            campaigns.add(campaign);
      }
      campaigns.sort();
    }
}

Thanks in advance!

John

 
Hello - 

I have a controller with a variable that is output as an array - and I would like to use UPDATE to give my users the ability to make in-line edits to records displayed an a VF page.  Is this at all possible? 

Here is my controller:
public with sharing class QualOpController
{

public List <Opportunity> Opty {get;set;}
public list<String> campaigns {get;set;}

public PageReference saveOp(){
    UPDATE Opty;
    return null;
    }

 public String getName(){
        return 'QualOpController';
        }

public void load() 
{
  campaigns= new List<String>();
  Opty = [Select id, name, CreatedDate, StageName, Vert_Med__c, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE Pipeline_Oppty__c = TRUE ]; 
  
  Set<String> campaignSet = new Set<String>();
  for (Opportunity j : Opty)
      campaignSet.add(j.Vert_Med__c);
      
      for (String campaign : campaignSet) 
      {
            campaigns.add(campaign);
      }
      campaigns.sort();
    }
}

I am trying to get this statement:  

 
public PageReference saveOp(){
    UPDATE Opty;
    return null;
    }

 public String getName(){
        return 'QualOpController';
        }

to update these records: 
 
campaigns= new List<String>();
  Opty = [Select id, name, CreatedDate, StageName, Vert_Med__c, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE Pipeline_Oppty__c = TRUE ];

But the changes just won't save. 

Is there anything I can do differently to make this work? 

Thanks, 

John
Hello, 

I am trying to make an HTML table inside of a VF page sortable - but I am having some trouble. 

I am using this sample as a template: http://www.kryogenix.org/code/browser/sorttable/

And if I create a dummy page with static, dummy data this works like a charm.  Howeever if I apply this to a VF page that retruns data from a controller it doesn't work. 

When I click on a table header, the alternating "up/down" arrows appear, but the data doesn't budge.  Is there something that I need to add to my controller to make this work?

Here is my page: 
 
<script src="{!URLFOR($Resource.sorttable)}"> </script>
<meta charset="utf-8" />
<title>R2M PIPELINE</title>
<link rel="stylesheet" type="text/css" href="{!URLFOR($Resource.GUIstyle)}" media="all" />
</head>
<body>
    <div id="header">
            <div id="logo">
                <a href="index.html"><img src="{!URLFOR($Resource.Logo)}" alt="" /></a>       
            </div>
<ul>
    <li><a href="apex/GUIHome"><span>Gene</span></a></li>
                <li><a href="/apex/HappeningNow"><span>Happening Now</span></a></li>
                <li><a href="/apex/ClientDelivery"><span>Client Delivery</span></a></li>
                <li><a href="/apex/MediaCash"><span>Media Cash</span></a></li>
                <li><a href="/apex/ROIREVENUE"><span>ROI and Revenue</span></a></li> 
                <li><a href="/apex/PRODUCTION"><span>Production</span></a></li>    
                <li><a href="/apex/SalesActivity"><span>Sales Activity</span></a></li> 
                <li><a href="/apex/PIPerformance"><span>PI Performance</span></a></li>
                <li><a href="https://na2.salesforce.com/"><span>Salesforce Home</span></a></li> 
            </ul>
  </div>
    <div id="body">
        <div class="about">
            <h1>R2M Pipeline</h1>
            <div>
            
           <c:PipelineNav />


 <apex:repeat value="{!campaigns}" var="camp">

    <apex:form >
    <apex:pageBlock title="{!camp}" mode="inlineedit">
        <table cellpadding="5" style="border-collapse: collapse;table-layout:fixed" width="1080" border="1" class="sortable" >
                
                <thead>
                <tr>
                              <th style="background-color: #C6D4D4; color: #040404" width="100">
                        <b>Opportunity Name</b>
                    </th>
                    <th style="background-color: #C6D4D4; color: #040404" width="100">
                        <b>Company Name</b>
                    </th>
                    <th style="background-color: #C6D4D4; color: #040404" width="80">
                        <b>Contract Sent</b>
                                   
                    
                    </th>
                     <th style="background-color: #C6D4D4; color: #040404" width="50">
                        <b>Days Idle</b>
                    </th>
                                 
                    <th style="background-color: #C6D4D4; color: #040404" width="70">
                        <b>Created</b>
                    </th>
        <th style="background-color: #C6D4D4; color: #040404" width="450">
                        <b>Next Step</b>
                    </th>
                  
                    <th style="background-color: #C6D4D4; color: #040404" width="50">
                        <b><apex:commandLink reRender="button" onclick="window.open('/apex/Probability_Guide','','width=500,height=300')" id="button">Prob%</apex:commandLink></b>
                    </th>
                    <th style="background-color: #C6D4D4; color: #040404" width="100">
                        <b>Owner</b>
                    </th>
                    <th style="background-color: #C6D4D4; color: #040404" width="100">
                        <b>Stage</b>
                    </th>
                
                </tr>
                </thead>
                
                 <apex:repeat value="{!Opty}" var="cs"> 
                 
                  <apex:outputPanel rendered="{!IF(camp=cs.Vert_Med__c,true,false)}" >
                  <tbody>
                      <tr>
                                  
                            <td width="100">
                                <a href="https://na2.salesforce.com/{!cs.id}">{!cs.name}</a>
                            </td>  
                              <td width="100">
                                {!cs.Company_Name__c}
                            </td> 
                                <td width="80">
                            
                               <apex:outputField value="{!cs.Contract_SENT__c}" >
                                     <apex:inlineEditSupport event="ondblclick" showOnEdit="saveButton, cancelButton" />
                                </apex:outputField>
                            </td>
                          
                           
                            <td width="50">
                                {!cs.Days_Since_Last_Modified__c}
                            </td>
                            <td width="70">
                                 {!MONTH(DATEVALUE(cs.CreatedDate))}/{!DAY(DATEVALUE(cs.CreatedDate))}/{!YEAR(DATEVALUE(cs.CreatedDate))}
                            </td>
                            
                            <td width="450">
                                <apex:outputField value="{!cs.Next_Step__c}" >
                                     <apex:inlineEditSupport event="ondblclick" showOnEdit="saveButton, cancelButton" />
                                </apex:outputField>
                            </td>
                
                           
                             <td width="50">
                                <apex:outputField value="{!cs.Probability}" >
                                     <apex:inlineEditSupport event="ondblclick" showOnEdit="saveButton, cancelButton" />
                                </apex:outputField>
                            </td>
                            <td width="100">
                                {!cs.Owner_Name__c}
                            </td>
                            <td width="100">
                                {!cs.StageName}
                            </td>
                          
                        </tr>
                     </tbody>
                      </apex:outputPanel>
                     </apex:repeat>
                     </table>
                     
                     <apex:commandButton action="{!saveOp}" value="Update Opptys"/>  
    </apex:pageBlock>
    </apex:form>
            <br/>
  </apex:repeat>
           
                          </div>
            <div>
                    
             </div>
            <div> </div>
        </div>
    </div>
         <div id="footer">
            <div>
                <div>
                    <h3></h3>
                    <ul>
                        <li></li>                
                        <li></li>
                    </ul>           
                </div>      
                <div>
                    <h3></h3>
                    <ul>
                        <li></li>                
                        <li></li>
                    </ul>           
                </div>  
                <div>
                    <h3></h3>
                    <ul>
                        <li></li>                
                        <li></li>
                    </ul>           
                </div>  
                <div>
                    <h3></h3>
                    <ul>
                        <li></li>                
                        <li></li>
                    </ul>           
                </div>  
                <div>
                    <h3>Social</h3>
                    <a class="facebook" href="https://www.facebook.com/pages/Ring2Media-INC/845391462194555" target="_blank">R2M Facebook</a>     
                    <a class="twitter" href="https://twitter.com/ring2media" target="_blank">R2M Twitter</a>
                </div>  
            </div>
            <div>
                            </div>
        </div>
        <style>

             .odd {

              background-color: #A4A4A4;

                }

             .even {

             background-color: #E6E6E6;

                }

            </style>
    </body>            
                  


</html>

And here is my controller: 
 
public with sharing class QualOpController
{

public List <Opportunity> Opty {get;set;}
public list<String> campaigns {get;set;}

public PageReference saveOp(){
    UPDATE Opty;
    return null;
    }

 public String getName(){
        return 'QualOpController';
        }

public void load() 
{
  campaigns= new List<String>();
  Opty = [Select id, name, CreatedDate, StageName, Vert_Med__c, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE Pipeline_Oppty__c = TRUE ]; 
  
  Set<String> campaignSet = new Set<String>();
  for (Opportunity j : Opty)
      campaignSet.add(j.Vert_Med__c);
      
      for (String campaign : campaignSet) 
      {
            campaigns.add(campaign);
      }
      campaigns.sort();
    }
}

Is it possible to achieve what I am trying to accomplish with this method?

Thanks, 

John
Hello, 

I am having trouble with In-line edit functionality that I developed 6 months ago or so... at some point in the past couple of weeks it has stopped working.  Has there been some sort of update or something that would cause a piece of functionality to just stop working?  Here is an example of a place where I am using inline edit: 

on VF page: 
<apex:form > 
           <apex:pageBlock title="Qualified" mode="inlineedit">
             <table cellpadding="5" style="border-collapse: collapse;table-layout:fixed" width="1120" border="1">
                <tr>
                      
                </tr>
                <apex:variable var="QualRev" value="{!0}"/>
                <apex:repeat value="{!listOfQualified}" var="qd">
                                                                         <tr >
                                  
                            
                              
                            <td width="450">
                                <apex:outputField value="{!qd.Next_Step__c}" >
                                     <apex:inlineEditSupport event="ondblclick" showOnEdit="saveButton, cancelButton" />
                                </apex:outputField>
                            </td>
                
                                                   
                            

                        </tr>
                               
            </table> 
            <apex:commandButton action="{!saveQD}" value="Update Opptys"/>
            </apex:pageBlock>
           </apex:form>

and on my controller: 
 
public PageReference saveQD(){
    UPDATE listOfQualified;
    return null;
    }

This setup worked for months - but then stopped.  I can't figure out why! Can anyone help? 

Thanks, 

John
 
Hello, 

I have a controller which includes serveral UPDATE statements - however I am running into a code coverage error and I think it is because my UPDATE is not covered in my test class.  I tried to add it but I ran into an error.  What is the best way for me to beef up the test class for the controller below?  Thanks in advance!
 
CLASS:

public class R2MPipeLineController{

    public List<Opportunity> listOfLive {get; set;}
    public List<Opportunity> listOfViability {get; set;}
    public List<Opportunity> listOfLaunchPad {get; set;}
    public List<Opportunity> listOfContractSent {get; set;}
    public List<Opportunity> listOfQualified {get; set;}
    public Opportunity Live {get; set;}
    public Opportunity Viability {get; set;}
    public Opportunity LaunchPad {get; set;}
    public Opportunity ContractSent {get; set;}
    public Opportunity Qualified {get; set;}
    
    public PageReference saveCS(){
    UPDATE listOfContractSent;
    return null;
    }
    
    public PageReference saveVI(){
    UPDATE listOfViability;
    return null;
    }
    
    public PageReference saveLP(){
    UPDATE listOfLaunchPad;
    return null;
    }
    
    public PageReference saveQD(){
    UPDATE listOfQualified;
    return null;
    }
    
    public String getName(){
        return 'R2MPipeLineController';
        }
    
public R2MPipeLineController() {
    listofLive = [Select id, name, CreatedDate, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Live' ORDER BY Weeks_Live__c DESC];
    listOfViability = [Select id, name, Amount, Projected_Revenue__c, CreatedDate, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Viability' ORDER BY Days_Since_Last_Modified__c DESC];
    listOfLaunchPad = [Select id, name, Amount, Projected_Revenue__c, CreatedDate, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Launch Pad' ORDER BY Days_Since_Last_Modified__c DESC];
    listOfContractSent = [Select id, name, Amount, Projected_Revenue__c, CreatedDate, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c, Contract_Age__c from Opportunity WHERE StageName = 'Contract Sent' ORDER BY Contract_Age__c ASC];
    listOfQualified = [Select id, name, Amount, Projected_Revenue__c, CreatedDate, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Qualified' ORDER BY Probability DESC]; 

}
}

And here is my test class: 
 
@isTest(seeAllData = false)
public class R2MPipeLineControllerTest{
    // Unit test Method
    static testmethod void UnitTest() {
        //Create your buyer record with required field
        //Opportunity o = new Opportunity(StageName = 'Qualified');
        //insert o;
        test.startTest();
           R2MPipeLineController qo = new R2MPipeLineController();
        test.stopTest();
    }   
}

 
Good Evening, 

I am using AggregateResult and GROUP BY ROLLUP to output some data.  After a long slog, I've got it working the way I need it to... except for one thing.  The "Total" row is showing at the top of the list instead of the bottom when I put the data into a table. 

Would anybody be able to help me get my total row so that it is the last item in the table?

Here is my VF page: 
<apex:page controller="CurrentWeekDY">
 
 <apex:pageBlock title="Delivery WTD">
 <apex:pageBlockTable value="{!DelSumOut}" var="dy">
   <apex:column value="{!dy.Campaign}" headerValue="Campaign" />
   <apex:column value="{!dy.Delivery}" headerValue="Delivery" />  
 
 </apex:pageBlockTable>
 </apex:pageBlock>
 
 

And here is my controller: 
public class CurrentWeekDY {
    public class DelSum {
        public String Campaign {get; set;}
        public String Delivery {get; set;}

        public DelSum(string c, string d) {
            this.Campaign = c;
            this.Delivery = d;
        }
    }

    public List<DelSum> DelSumList = new List<DelSum>();

    public List<DelSum> getDelSumOut() {
        AggregateResult[] AgR = [SELECT Camp__c, SUM(Spend__c) FROM TL_Client__c WHERE CWDelivery__c = TRUE GROUP BY ROLLUP(Camp__c) ORDER BY Camp__c];

        for (AggregateResult DYList : AgR) {
            DelSumList.add(new DelSum(String.valueOf(DYList.get('Camp__c')), String.valueOf(DYList.get('expr0'))));
        }

        return DelSumList;
    }
}


I would really appreciate any help!!

Thanks, 
 

John 

Hello,

I am trying to use AggregateResult to build a controller for a VF page.  This is the fist time that I am using this function and am recieving the error: 
Error: Compile Error: Missing '<EOF>' at 'public' at line 10 column 1

I have googled this like crazy, and seem to understand that it is because I have markup outside of the wrapper but I still can't understand how to fix it?  Can anyone help?

Here is my class: 
 
public class CurrentWeekDY{
    String Campaign {get; set;}
    String Delivery {get; set;}
        public DelSum(string c, string d){
        this.Campaign=c;
        this.Delivery=d;
        
    }
}
public List<DelSum> DelSumList = new List<DelSum>();

public List<DelSum> getDelSumOut(){

    AggregateResult[] AgR = [SELECT Campaign_TL__c, SUM(Spend__c) FROM TL_Client__c WHERE CWDelivery__c = TRUE GROUP BY Campaign_TL__c ORDER BY Campaign_TL__c]; 
    for (AggregateResult DYList : AgR) { 
        DelSumList.add(new DelSum(String.valueOf(DYList.get('Campaign_TL__c')), String.valueOf(DYList.get('expr0')), String.valueOf(DYList.get('expr1'))));
    }
    return DelSumList;
}

Thank you so much for any help!

John 

Hello, 
 

I am trying to build a "Copy To Clipboard" button for one of my VF pages. 

I found the code below on GitHub (will attribute author at bottom), but it displays the text to be copied in an output field.  The functionality works just as I want it to, but I don't want to display the text, I just want to store it behind the button.  Can anyone help me convert the OutPutPanel portion to a stored variable?  I've been playing around with this for a while and can't figure it out. 

Here is the code: 
 

<apex:page title="Clipboard Test" >
<apex:messages />
    <script language="JavaScript">
        function ClipBoard(copytextid, holdtextid){
            copyToClipboard(copytextid);
        }
        function copyToClipboard(elementId) {
          // Create an auxiliary hidden input
          var aux = document.createElement("input");
          // Get the text from the element passed into the input
          aux.setAttribute("value", document.getElementById(elementId).innerHTML);
          // Append the aux input to the body
          document.body.appendChild(aux);
          // Highlight the content
          aux.select();
          // Execute the copy command
          document.execCommand("copy");
          // Remove the input from the body
          document.body.removeChild(aux);
        }    
    </script>   
    <apex:pageblock >
    <apex:form >
        <apex:outputpanel ID="copytext" STYLE="height:150;width:162;background-color:pink">
            TEXT TO BE COPIED
        </apex:outputpanel> 
        <apex:inputtextarea ID="holdtext" STYLE="display:none;"></apex:inputtextarea>
        <apex:commandbutton onClick="ClipBoard('{!$Component.copytext}', '{!$Component.holdtext}');" rerender="copytext" value="Copy to Clipboard"/> 
    </apex:form>
    </apex:pageblock>
</apex:page>
**Source: https://gist.github.com/nithesh1992/dc66708bde9ab94313a731a715fef9ad#file-copy-txt

I want to accomplish something like this:
 
<apex:variable ID="copytext" value="TEXT TO BE COPIED" "/>
            
      
        <apex:inputtextarea ID="holdtext" STYLE="display:none;"></apex:inputtextarea>
        <apex:commandbutton onClick="ClipBoard('{!$Component.copytext}', '{!$Component.holdtext}');" rerender="copytext" value="Copy to Clipboard"/>

So that the only visable piece is the button.  Can anyone help me with this?!

Thank you, and happy thanksgiving!
Hello, 

I am trying to write a test class for a VF controller, and I am getting an error saying the variable does not exist even though it does!  Why would this be happening? 

Here is my controller: 
 
public class DailySalesReportController{ 

        public List<Opportunity> listOfCefOpToday {get;set;}
        public List<Opportunity> listOfLoganOpToday {get;set;}
        public List<Lead> listOfCefLdToday {get;set;}
        public List<Lead> listOfLoganLdToday {get;set;}
        public List<Sales_Meetings__c> listOfCefSkedToday {get;set;}
        public List<Sales_Meetings__c> listOfLoganSkedToday {get;set;}
        public List<Sales_Meetings__c> listOfCefOcToday {get;set;}
        public List<Sales_Meetings__c> listOfLoganOcToday {get;set;}
        public Opportunity CefOpToday {get;set;}
        public Opportunity LoganOpToday {get;set;}
        public Lead CefLdToday {get;set;}
        public Lead LoganLdToday {get;set;}
        public Sales_Meetings__c CefSkedToday {get;set;}
        public Sales_Meetings__c LoganSkedToday {get;set;}
        public Sales_Meetings__c CefOcToday {get;set;}
        public Sales_Meetings__c LoganOcToday {get;set;}
    
    public DailySalesReportController(){
        listOfCefOpToday = [Select id, name from Opportunity WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Jeff Cefalu'];
        listOfLoganOpToday = [Select id, name from Opportunity WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Logan Connolly'];
        listOfCefLdToday = [Select id, name from Lead WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Jeff Cefalu'];
        listOfLoganLdToday = [Select id, name from Lead WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Logan Connolly'];
        listOfCefSkedToday = [Select id, name from Sales_Meetings__c WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Jeff Cefalu'];
        listOfLoganSkedToday = [Select id, name from Sales_Meetings__c WHERE Created_Today__c = TRUE AND Owner_Name__c = 'Logan Connolly'];
        listOfCefOcToday = [Select id, name from Sales_Meetings__c WHERE Occurred_Today__c = TRUE AND Owner_Name__c = 'Jeff Cefalu'];
        listOfLoganOcToday = [Select id, name from Sales_Meetings__c WHERE Occurred_Today__c = TRUE AND Owner_Name__c = 'Logan Connolly'];
        
        
}
}

And here is my test: 
 
@isTest(seeAllData = true)
public class DailySalesReportControllerTest{
    // Unit test Method
    static testmethod void UnitTest() {
        //Create your Opportunity record with required field
        //Opportunity b = new Opportunity(Created_Today__c = TRUE);
        //insert b;
        test.startTest();
           DailySalesReportControllerTest ub = new DailySalesReportControllerTest();
           
           if(ub.listOfCefOpToday!=null && !ub.listOfCefOpToday.isEmpty())
           Opportunity cefOpportunity = ub.listOfCefOpToday.get(0);
           
           if(ub.CefOpToday !=null)
            String CefOpTodayId = ub.CefOpToday.Id;
           
        test.stopTest();
    }   
}

I keep getting this error: 
 
Error: Compile Error: Variable does not exist: listofcefoptoday at line 12 column 41

Can anyone help?  I'm really stuck here 
Hello, 

I have an apex class that functions as a VF page controller, and when I run the associated test class it passes - but when I look at the class the coverage is at 0% and it is bringing my code coverage down below 75%.  How can this be?  I would really appreciate some help here!

Here is my controller: 
 
public class R2MBizBookController{

    public List<Buyer__c> listOfDeck {get; set;}
    public List<Buyer__c> listOfNewThirty {get; set;}
    public List<Buyer__c> listOfNewTW {get; set;}
    public List<Buyer__c> listOfLegacy {get; set;}
    public List<Buyer__c> listOfTQ {get; set;}
    public List<Buyer__c> listOfAQ {get; set;}
    public List<Buyer__c> listOfBQ {get; set;}
    public List<Buyer__c> listOfCQ {get; set;}
    public List<Buyer__c> listOfDQ {get; set;}
    public List<Buyer__c> listOfEQ {get; set;}
    public Buyer__c Live {get; set;}
    public Buyer__c NewTW {get; set;}
    public Buyer__c Viability {get; set;}
    public Buyer__c LaunchPad {get; set;}
    public Buyer__c TQ {get; set;}
    public Buyer__c AQ {get; set;}
    public Buyer__c BQ {get; set;}
    public Buyer__c CQ {get; set;}
    public Buyer__c DQ {get; set;}
    public Buyer__c EQ {get; set;}
   
public R2MBizBookController() {
    listofDeck = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Commitment_c__c from Buyer__c WHERE Pipeline_Status__c = 'OnDeck' ORDER BY Name ASC];
    listofNewThirty = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'New 30' ORDER BY Sales_Origination_Date__c DESC];
    listofNewTW = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE  New_Live__c = TRUE  ORDER BY Sales_Origination_Date__c DESC];
    listofLegacy = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'Legacy' ORDER BY  Sales_Origination_Date__c DESC];
    listofTQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE TQ_Pipeline__c = TRUE ORDER BY  Sales_Origination_Date__c DESC];
    listofAQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'AQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofBQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'BQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofCQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'CQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofDQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'DQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofEQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'EQ' ORDER BY  Sales_Origination_Date__c DESC];
   


}
}

and here is my test class: 
 
@isTest(seeAllData =  true)
public class R2MBizBookControllerTest{
    // Unit test Method
    static testmethod void UnitTest() {
        //Create your buyer record with required field
        //Buyer__c b = new Buyer__c(Pipeline_Status__c = 'Legacy');
        //insert b;
        test.startTest();
           R2MBizBookController ub = new R2MBizBookController();
        test.stopTest();
    }   
}

I ill be eternally grateful if someone can help me solve this!

Thank you, 

John
Hello, 

I have a controller that is showing 0% code coverage, but I'm not sure why my test class isn't covering anything.  Can anyone help? 

Here is my controller: 
 
public class R2MBizBookController{

    public List<Buyer__c> listOfDeck {get; set;}
    public List<Buyer__c> listOfNewThirty {get; set;}
    public List<Buyer__c> listOfNewTW {get; set;}
    public List<Buyer__c> listOfLegacy {get; set;}
    public List<Buyer__c> listOfTQ {get; set;}
    public List<Buyer__c> listOfAQ {get; set;}
    public List<Buyer__c> listOfBQ {get; set;}
    public List<Buyer__c> listOfCQ {get; set;}
    public List<Buyer__c> listOfDQ {get; set;}
    public List<Buyer__c> listOfEQ {get; set;}
    public Buyer__c Live {get; set;}
    public Buyer__c NewTW {get; set;}
    public Buyer__c Viability {get; set;}
    public Buyer__c LaunchPad {get; set;}
    public Buyer__c TQ {get; set;}
    public Buyer__c AQ {get; set;}
    public Buyer__c BQ {get; set;}
    public Buyer__c CQ {get; set;}
    public Buyer__c DQ {get; set;}
    public Buyer__c EQ {get; set;}
   
public R2MBizBookController() {
    listofDeck = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Commitment_c__c from Buyer__c WHERE Pipeline_Status__c = 'OnDeck' ORDER BY Name ASC];
    listofNewThirty = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'New 30' ORDER BY Sales_Origination_Date__c DESC];
    listofNewTW = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE  New_Live__c = TRUE  ORDER BY Sales_Origination_Date__c DESC];
    listofLegacy = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'Legacy' ORDER BY  Sales_Origination_Date__c DESC];
    listofTQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE TQ_Pipeline__c = TRUE ORDER BY  Sales_Origination_Date__c DESC];
    listofAQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'AQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofBQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'BQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofCQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'CQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofDQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'DQ' ORDER BY  Sales_Origination_Date__c DESC];
    listofEQ = [Select id, name, Sales_Lead_Source__c, Routing_Status__c, Client_Status__c, Total_Re_Orders__c, Sales_Quarter__c, Funds_Collected_All_Time__c, Sales_LN__c, Sales_Origination_Date__c from Buyer__c WHERE Pipeline_Status__c = 'EQ' ORDER BY  Sales_Origination_Date__c DESC];
   
and here is my test: 

}
}
and here is my test? 
 
@isTest(seeAllData = false)
public class R2MBizBookControllerTest{
    // Unit test Method
    static testmethod void UnitTest() {
        //Create your buyer record with required field
        //Buyer__c b = new Buyer__c(Pipeline_Status__c = 'Legacy');
        //insert b;
        test.startTest();
           R2MBizBookController ub = new R2MBizBookController();
        test.stopTest();
    }   
}

would anyone be willing to help me beef this up?

it would mean the world to me. 

thank you in advance!!!!!!

John 
 

Hello, 

I am attempting to use inputText on a VF page and can't figure out how to save the value to the record.  Does anyone have an example of this that I could bootstrap off of? 

I am using a custom object & controller. 
 

Here is the string from the VF page: 
 

apex:inputText value="{!spotObj.Workload__c}"/> <apex:commandButton value="Save" action="{!saveSpot}"/>
And here is my controller: 
 
public with sharing class SpotsInProcess{

    public List <Job_Number__c> listOfInProgress {get;set;}
    public Job_Number__c InProgress  {get;set;}

public PageReference saveSpot(){
    UPDATE listOfInProgress;
    return null;
    }


public SpotsInProcess(){
    listOfInProgress = [Select id, name, Workload__c, Notes__c, Thumbnail_URL__c, ISCI__c, Title__c,   First_Air_Date__c,  Last_Air_Date__c, Project__c, Campaign__r.Name, Nets_Running__c, View_Link__c, Internal_Title__c, Legal__c, Airing_Agencies__c from Job_Number__c where Job_Status__c = 'In Progress']; 
}
}

It would mean the world to me if someone could help me out!

Thanks in advance! 
 
Hello, 

I am using apex:outputLink on a vf page to open a new window - but it is refreshing my original page upon click.  Is there a way to stop this?  Here is my link. 
 
<apex:outputLink onclick="window.open('AllSpotsMoreDetails?id={!spotObj.Id}', 'newwindow', 'width=800, height=900')"> More Details</apex:outputLink>

Thanks, 

John

 
Hello, 

I have a VF page that is using apex:repeat to create a table column for each related object record like so:
 
<apex:repeat value="{!Quarterly_Buy__c.Media_Buys__r}" var="buys">
                     <td style="background-color: #D8D8D8; color: #190707;font-size:14px;" align="center">
                        <b>{!MONTH(buys.Broadcast_Week__c)}/{!DAY(buys.Broadcast_Week__c)}/{!VALUE(RIGHT(TEXT(YEAR(buys.Broadcast_Week__c)),2))}</b>
                    </td>

I want to add a condition where a column is only renedered if the field "Broadcast_Week__c" on the child record is greater than Today. 

I have adding a "Display" attribute to the td saying: 
 
display: {!IF(Quarterly_Buy__c.Media_Buys__r.Broadcast_Week__c < Today(), 'none', 'table-column')};"

but I am getting en error. 

Can anyone help? 

Thanks, 

John
Hello, 

I am trying to add UPDATE functionality to a controller and am getting the error: DML requires SObject or SObject list type: List<String>

However my variable is set up like this: public List<String> campaigns {get;set;}

I am not sure how to achieve the proper syntax here, and was hoping that someone out there in developerland would be able to help me!

Here is my (broken) controller: 
 
public with sharing class QualOpController
{

public List <Opportunity> listOfOpty {get;set;}
public List<String> campaigns {get;set;}

public PageReference saveOp(){
    UPDATE campaigns;
    return null;
    }

 public String getName(){
        return 'QualOpController';
        }

public void load() 
{
  campaigns= new List<String>();
  listOfOpty = [Select id, name, CreatedDate, StageName, Vert_Med__c, Company_Name__c, Next_Step__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE Pipeline_Oppty__c = TRUE ]; 
  
  Set<String> campaignSet = new Set<String>();
  for (Opportunity j : listOfOpty)
      campaignSet.add(j.Vert_Med__c);
      
      for (String campaign : campaignSet) 
      {
            campaigns.add(campaign);
      }
      campaigns.sort();
    }
}

Thanks in advance!

John