• bozotheclown
  • NEWBIE
  • 15 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 130
    Questions
  • 136
    Replies
Hello.  I am struggling to identify a way to prevent multiple records being created by clicking a commandbutton multiple times (often due to a slow internet connection).  I know there are a few ways to accomplish this if the commandbutton is not set up to take the user to another page (simply by making the button disappear briefly, etc).

However, my problem is that I have a commandbutton that inserts a record and then takes the user to another page.  It seems the tricks for making a button disappear briefly (such as actionstatus) do not work when the commandbutton is taking the user to a different page.

In other words, I am trying to figure out a way for a user to click a commandbutton...the button will disappear...and the user will then be taken to the next page.

Any suggestions?

Thanks in advance.
I am having issues developing a test for the below code.  Any suggestions would be greatly appreciated.

Thanks in advance.



Public String GrabDate { get; set;}
Public String ComputedValSTR { get; set;}
Public Decimal ComputedVal { get; set;}

public List<aaa> getzzz() {
List<aaa> bbb = new List<aaa>();
AggregateResult[] ccc = [SELECT Date__c dt, SUM(Charges__c) FROM Cars__c GROUP BY Date__c ORDER BY Date__c asc];
for (AggregateResult xxx : ccc) {
GrabDate = string.valueOf(xxx.get('dt'));
ComputedValSTR = string.valueOf(xxx.get('expr0'));
ComputedVal = decimal.valueOf(ComputedValSTR);
bbb.add(new aaa(GrabDate, ComputedVal));
}
return bbb;
}


public class aaa {
public String DtValue { get; set; }
public Decimal ChargesVal { get; set; }

public aaa(String DtValue, Decimal ChargesVal) {
this.DtValue = DtValue;
this.ChargesVal = ChargesVal;
}
}

Hello.  Could someone help me figure out how to view my line-by-line code coverage (the red vs blue shaded lines).  Most recently, all I had to do was go to the Developer Console and double-click on the corresponding controller (in the bottom right-hand corner).  Unfortunately, this "Overall Code Coverage" box is now empty - and I can't figure out any other way to view my coverage.  Did something change with the new release?

 

 

Thanks

Hello. Could anyone give me some guidance with the below.

I maintain a list of sales orders and customers. I have created a VF page that lists/groups customer sales orders for a date range desired by the user. That part was easy.

My issue is that I want to show the average PER DAY sales totals for each customer in this list. Unfortunately, identifying the number of days in the date range is not easy as subtracting startdate-enddate....since I need to omit holidays/weekends.

I have tried to just identify unique occurrences of CreatedDate...but the datetime nature of this field means that multiple records from a single date are treated as multiple occurrences.

Does anyone have suggestions on how to count CreatedDate occurrences from a date perspective? Thanks in advance.


Hello.  Does anyone know what happened to the ability to click on the code coverage percentage for a speficic controller?  In the past, we could click on a percentage and see the lines of code shaded a particular color to denote coverage.  Now, when I click the coverage percentage all I get is a blank page.

 

Any thoughts?

 

 

Thanks

Hello. I am having an odd problem.

 

For some reason I canot log into my sandbox (although I am almost certain that I am using the correct password).  Yes, I am logging in from "test.salesforce.com"

 

I tried to use the "Forgot your password" link to get my password e-mailed to me.  Unfortunately, it has been over 12 hours and I have not yet received an e-mail (and have checked my spam folder too).

 

Any thoughts?  Has the login procedure changed for sandboxes with the latest release?

 

Thanks.

Hello.  I have an ActionPoller that forces a refresh of a VF pageBlockTable every ten seconds.  I am hoping to add an audio alert to notify if the pageBlockTable changes upon refresh.  Are we able to do this via Apex?  In other words, is there any audio alert that I could use to note that a list size has changed?

 

Thanks in advance.

Hello.  I have a quick question.

 

I have three buttons which utilize a few exact lines of code.  For this example, let's say two lines of code (although in reality, it is much more).

 

Is there a way in Apex for me to only list those lines of code once...and for each pagereference to go to those shared lines somewhere?

 

The reason for asking this is that I likely will revise the shared code...and ideally would like to only have to edit it once.

 

Thanks in advance.

 

public PageReference button1() {
// unique code here for button1
// insert identical code lines 1 and 2
return Page.AAA;
}


public PageReference button2() {
// unique code here for button2
// insert identical code lines 1 and 2
return Page.BBB;
}


public PageReference button3() {
// unique code here for button3
// insert identical code lines 1 and 2
return Page.CCC;
}



// identical code used across the three buttons - I ideally would only like to type these three lines
// just one time since I might edit it at a later date (so it would be simpler to only edit the code once)
IntegerA = IntegerB+IntegerC;  // Identical code line #1
IntegerZ = IntegerA+IntegerD;  // Identical code line #2

 

Hello.  I am trying to delete a few lines of a custom controller - via the salesforce.com section SETUP --> DEVELOP --> APEX CLASSES.  I have confirmed that I have deleted all references to these deleted lines in the rest of my controller and associated VF pages.  Unfortunately, I continue to receive the error message "This apex class is referenced elsewhere in salesforce.com. Remove the usage and try again. at line 0 column 0".  

 

I absolutely know that the deleted apex class is not referenced anywhere else in my delopymnet (VF pages, triggers, etc, etc)....so I am totally lost as to why this is happening.

 

After doing some searching on the web, I noticed a comment that you cannot delete classes...unless you do it with the migration tool.  

 

Is that my problem?  So there is no way to simply delete the line of code that references an apex class?

 

Thanks in advance.

Hello.  I have an e-mail template that is used by a workflow e-mail alert.  The e-mail alert is based on the workorder__c field.  I also have a related object (via lookup relationship) called parts__c. 

 

I am able to display the workorder__c.workordername__c field values in e-mails created from this template.  However, I am getting blanks where I am trying to display parts__r.partname__c.

 

In short, is there any way to display data from related objects in an HTML template...or can you only display data from a specific object?

 

Hope this makes sense.  Thanks in advance.

Hello. I have run into a strange issue which I was curious if anyone had seen previously. Simply put, my force.com branded login page (xxxxxx.cloudforce.com) does not save the user name even though I have been (constantly) checking the "Remember User Name" checkbox. My first thought would be that this is a browser issue...but when I go to the regular force.com login page (https://login.salesforce.com/) from the SAME browser to login to the SAME account, the "Remember User Name" checkbox works properly. Any thoughts on why this is happening? Does anyone know how to fix this? Thanks in advance.

Hello.  I am trying to customize my force.com home page with a VF page.  I have figured out to do it via Setup --> Customize --> Home  - but I still have an issue.

 

The issue is that this approach is not removing the recycle bin and the salesforce.com copyright in the footer of the page.  Does anyone know if it is possible to remove both of these items too?

 

Thanks in advance.

 

Hello Board,

 

I have been using https://login.salesforce.com/ to login into the salesforce instance.

 

Is there any way to customize this login url for example: mycompany.myproduct.com?

 

Thanks,
Devendra S

Hello. 

 

I had been seeing strange behavior on a page - and narrowed down the cause of thisodd behavior to the use of an ActionPoller.  After doing some research, it seems that using an ActionPoller with a dataTable causes problems.

 

Below is my code.  Does anyone have any suggestions how to refresh this table - but avoid known problems with ActionPoller & DataTable?

 

Any thoughts would be appreciated.  Thanks in advance.

 

<apex:pageBlock title="Customer Overview"> 
<apex:dataTable value="{!Customers}" var="cust" id="CustList" width="100%" > 
 <apex:column > 
  <apex:facet name="header"><b>Customer Name</b></apex:facet> 
  <apex:commandLink action="{!invokeService}"
                    value="{!cust.CustName__c}" rerender="blockA, blockB">
    <apex:param name="xxx" value="{!cust.id}"/>
  </apex:commandLink>
 </apex:column> 
</apex:dataTable> 
<apex:actionPoller rerender="CustList" interval="5"/>
</apex:pageBlock>