• West415
  • NEWBIE
  • 20 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 25
    Questions
  • 15
    Replies

In production, code coverage is showing 83%. In sandbox, it is showing 75%. I have just 1 apex class and associated test class I am trying to deploy to production, but it fails saying only 30% coverage in production.

The apex class I am trying to deploy has 90% coverage, why can't I deploy this class and associated test class to production?

We are using lightning and it is a bit frustrating at times becuase we have a dashboard that has charts on it and sometimes the charts say  "We can't draw this chart because there is no data", but then when you click the "View report" link underneath data is definitely there.   Any idea on how to solve for this?
 

Hi,

I am using process builder and have created a very simple criteria against the "Task" object.  The goal of the process is when an email is sent from a lead record to update a field on the lead record with a value of 1.   The email gets sent and I see it in the activity history, but the criteria does not get met therefore my immediate action doesn't execute.   

If I choose Task.TaskSubType of "Call" it works fine, but not with Task.TaskSubType of "Email" as shown in my screenshot for some reason.

User-added image

Any help appreciated.
 

Thanks!

  • September 18, 2018
  • Like
  • 0
I am using Lightning and have created a dashboard.  I want to add a filter or two my dashboard.

1. What determines the fields available in the drop down for filtering?
2. If I have multiple components from different objects (leads, and opportunities for example) does it only make sense to use a filter that has the same value across both objects?   In other words, if I want to use dashboard filters, should I be really making a dashboard that only has components related to a single object?
  • September 16, 2018
  • Like
  • 0
Hi,

I have a custom visualforce page.  I have an <apex:selectList /> that has a default value set when the page loads.  How can I get the value of the selected item in the select list in my controller?
 
<apex:page controller="CustomController" showHeader="true" sidebar="true" action="{!showMeSelectedValue}">
In jQuery, the equivalent may be something like  $('#fieldID').val();   On page load, when the "showMeSelectedValue()" is called, I want to get the value of a given select list on my page.

How can this be done?
 
I'm using Data Loader to load in about 300 leads.  I have a trigger that runs before a lead gets inserted that checks to see if the lead exists based on a few fields on the Lead object.   If it does exist, it generates an error using addError().     Some of my data makes it in using Data Loader, but some of it doesn't and generates this error.

How can I load my leads in and avoid this error? 
I have a small controller that I'm using and I'm trying to figure out if there is a way I can pass a cookie to a visualforce page within a PageRefernece.   I'd like the cookie to be available on my visualforce page so I can just do {!someCookieValue}.

Do I need to create another controller for the visualforce page I'm returning?

Here is the code:
 
public with sharing class pageController {

  public PageReference getTemplate() {

   Cookie someCookieValue = ApexPages.currentPage().getCookies().get('thecookie');
   return Page.HomePageTemplate;
   }

}

 
HI,

I'm working with a visualforce page and form and I wanted to display a list if U.S. States as just text with checkboxes underneath each state for the cities in that state. 

So for example:

Nevada
 - Reno
 - Carson City
 - Las Vegas

Colorado
 - Denver
 - Boulder

I have a custom object that stores customer records.  In the address fields I store the city and state.  I want to generate the output above using this data and have a checkbox rendered for each city.

Any ideas on how to do this using visualforce?
 
  • September 16, 2015
  • Like
  • 1
Hi,

I'm getting this error in my code:   Save error: Incompatible element type
 
List<Candidate__c> candidateList = new List<Candidate__c>();

Map<String,List<Candidate__c>> candidateMap = new Map<String,List<Candidate__c>>();


.......


candidateList.add( candidateMap.values() );

I did a system.debug() on my map and I see the candidate records.  I'm trying to extract the values out from the map and populate my list, but I get the error "Incompatible element type", I thought the values() method would return a list.

Any help appreciated.
 

Hi,

We have a scheduled batch apex job that will run every hour and do some processing on records.  It works fine, but sometimes it will just no longer be scheduled and then we go in and start it again and it will work for maybe a week, sometimes two weeks, then it just stops.  

Has anyone seen this behavior before or know of any reason why a scheduled job would suddenly stop being scheduled?

Thanks for any thoughts here...

Hi,
 

I have about 800+ scheduled jobs in my org and I want to mass delete them.  How can I do this either through the UI ideally in bulk or via code?  Any help appreciated.  I know I can click the delete link next to each job, but I don't want to do that because it will takes a LONG time obviously.

Thanks!

Hi,

This seems like a simple question, but I can't seem to find the answer.  Can someone please tell me how can I find out exactly when a custom field was created on an object?  I can see the last modified by/date column when looking at the object definition, but how can I find out when a given field was originally created in salesforce?

Thanks....
Hi,

I have an approval process setup and wanted to know can I execute a trigger or apex code after a record has been approved?

Thanks...

Hi,
 

How can I remove someone as a Portal Administrator?  I can't seem to find the place to do this.  I'm trying to deactivate a user who is a Portal Admin and it won't let me so there must be a way to remove them from this role and then deactivate them.


Can anyone shed some light?
 

Thanks!

Hi, I have 4 required picklists on a detail page and each picklist has the values (1,2,3,4,N/A). At the bottom of the page, I have a text input field to hold the total sum of all 4 picklists. I want to add up the values of all the picklists and write it to a another input value on page when the user clicks save. Can this be done?

Hi,

 

I have a custom field on a custom object called "Days Job Open".  I want to know how to populate this field via a workflow and specifically what criteria would I need.  I know what I want to do, but not quite sure of the steps needed to make it happen.   


The logic is that whenever a job is posted I want to populate this field with the value equal to the number of days the job has been open.    All jobs have a "published date" and an "end date" so I want to subtract and get the difference and that will be my value I want to put in my "Days Job Open" column.

 

How can I do this?

 

 

Hi,

 

I'm working with a custom object here.


One of the fields is of the "picklist" type and I have some values in it.  I replaced ONE of the values by using the "replace" functionality on the picklist.  I now need to find those records that were replaced.  I should have maybe exported them via Data Loader first so I would have a backup, lesson learned, but is there a way to determine the records that were affected?


in the "View Setup Audit Trail" section I can see the log entry for when I replaced the values and the exact time the records were replaced, but I'm not sure if there is a way to query to flag those records?  From what I can tell the "last modified column" doesn't change when you replace a picklsit value, but I'm not 100% sure. 

 

Any help highly appreciated, I'm hoping there is a way??

  • September 11, 2013
  • Like
  • 0

When creating a new user if you enter the wrong email address, basically an invalid one on accident, how can you correct the email address?

 

The system seems to want to send an email to the user to verify the change, but the email address is bad so what can be done?

 

Thanks...

I think this should be an easy question. How can I determine/see all objects a user owns?

There must be an easy way to do this.

Hi,

 

I have this code snippet and I'm trying to simply append some query string parameter to the end of it.  How can this be done?

 

public with sharing class MyCustomController {

 

  public PageReference login() {

    return SiteVariables.getLogin();
  }

 

}

 

I want to append a query string parameter to the end of the PageReference so when the "Login" page is returned it has a URL something like "http://site.com/apex/login?customerlocation=TX for example

 

In this example, "custoemrlocation" would be the variable with "TX" as the value.

 

Any help appreciated.

HI,

I'm working with a visualforce page and form and I wanted to display a list if U.S. States as just text with checkboxes underneath each state for the cities in that state. 

So for example:

Nevada
 - Reno
 - Carson City
 - Las Vegas

Colorado
 - Denver
 - Boulder

I have a custom object that stores customer records.  In the address fields I store the city and state.  I want to generate the output above using this data and have a checkbox rendered for each city.

Any ideas on how to do this using visualforce?
 
  • September 16, 2015
  • Like
  • 1

Hi,

I am using process builder and have created a very simple criteria against the "Task" object.  The goal of the process is when an email is sent from a lead record to update a field on the lead record with a value of 1.   The email gets sent and I see it in the activity history, but the criteria does not get met therefore my immediate action doesn't execute.   

If I choose Task.TaskSubType of "Call" it works fine, but not with Task.TaskSubType of "Email" as shown in my screenshot for some reason.

User-added image

Any help appreciated.
 

Thanks!

  • September 18, 2018
  • Like
  • 0
I'm using Data Loader to load in about 300 leads.  I have a trigger that runs before a lead gets inserted that checks to see if the lead exists based on a few fields on the Lead object.   If it does exist, it generates an error using addError().     Some of my data makes it in using Data Loader, but some of it doesn't and generates this error.

How can I load my leads in and avoid this error? 
I have a small controller that I'm using and I'm trying to figure out if there is a way I can pass a cookie to a visualforce page within a PageRefernece.   I'd like the cookie to be available on my visualforce page so I can just do {!someCookieValue}.

Do I need to create another controller for the visualforce page I'm returning?

Here is the code:
 
public with sharing class pageController {

  public PageReference getTemplate() {

   Cookie someCookieValue = ApexPages.currentPage().getCookies().get('thecookie');
   return Page.HomePageTemplate;
   }

}

 
Hi,

I'm getting this error in my code:   Save error: Incompatible element type
 
List<Candidate__c> candidateList = new List<Candidate__c>();

Map<String,List<Candidate__c>> candidateMap = new Map<String,List<Candidate__c>>();


.......


candidateList.add( candidateMap.values() );

I did a system.debug() on my map and I see the candidate records.  I'm trying to extract the values out from the map and populate my list, but I get the error "Incompatible element type", I thought the values() method would return a list.

Any help appreciated.
 

Hi,

We have a scheduled batch apex job that will run every hour and do some processing on records.  It works fine, but sometimes it will just no longer be scheduled and then we go in and start it again and it will work for maybe a week, sometimes two weeks, then it just stops.  

Has anyone seen this behavior before or know of any reason why a scheduled job would suddenly stop being scheduled?

Thanks for any thoughts here...

Hi,
 

I have about 800+ scheduled jobs in my org and I want to mass delete them.  How can I do this either through the UI ideally in bulk or via code?  Any help appreciated.  I know I can click the delete link next to each job, but I don't want to do that because it will takes a LONG time obviously.

Thanks!

Hi,

This seems like a simple question, but I can't seem to find the answer.  Can someone please tell me how can I find out exactly when a custom field was created on an object?  I can see the last modified by/date column when looking at the object definition, but how can I find out when a given field was originally created in salesforce?

Thanks....
My vf Page-

<apex:page sidebar="false" standardStylesheets="false" showHeader="false">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"/>
    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"/>

    <apex:includeScript value="{!URLFOR($Resource.bootstrap, 'bootstrap/js/bootstrap.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.bootstrap, 'bootstrap/js/bootstrap.min.js')}"/>
 
    <apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'bootstrap/css/bootstrap.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'bootstrap/css/bootstrap.min.css')}"/>
 
  
     <link href="//getbootstrap.com/examples/signin/signin.css" rel="stylesheet" media="screen"/>
   


<!-- Button trigger modal -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
</apex:page>
Hi,

I have an approval process setup and wanted to know can I execute a trigger or apex code after a record has been approved?

Thanks...

Hi,
 

How can I remove someone as a Portal Administrator?  I can't seem to find the place to do this.  I'm trying to deactivate a user who is a Portal Admin and it won't let me so there must be a way to remove them from this role and then deactivate them.


Can anyone shed some light?
 

Thanks!

When creating a new user if you enter the wrong email address, basically an invalid one on accident, how can you correct the email address?

 

The system seems to want to send an email to the user to verify the change, but the email address is bad so what can be done?

 

Thanks...

I think this should be an easy question. How can I determine/see all objects a user owns?

There must be an easy way to do this.

Hi,

 

I have this code snippet and I'm trying to simply append some query string parameter to the end of it.  How can this be done?

 

public with sharing class MyCustomController {

 

  public PageReference login() {

    return SiteVariables.getLogin();
  }

 

}

 

I want to append a query string parameter to the end of the PageReference so when the "Login" page is returned it has a URL something like "http://site.com/apex/login?customerlocation=TX for example

 

In this example, "custoemrlocation" would be the variable with "TX" as the value.

 

Any help appreciated.

Hi,

 

I'm new to developing applications with salesforce and have a question that I was hoping someone could understand.  I do have some general programming experience, but just not within salesforce.

 

I cloned an existing Visual Force Page and it works fine for the most part, but when I add this component to the page and tried to run the page in my browser I get a default maintenance page.  There obviously is an error or something is not referenced that needs to be in my page.  Below is the snippet where I have this component being declared.

 

 <div id="accordion_menu">
      <div>
           <as2:SampleMenu ></as2:SampleMenu>
       </div>
  </div>

 

If I remove "  <as2:SampleMenu ></as2:SampleMenu>" the page runs fine, but when I added the above component reference (hope I'm saying that right) I get the default maintenance page saying  "Sorry for the inconvenience. We'll be back shortly. Please email us if you need to get in touch."

 

This error/maintenance page isn't helpful at all so I'm somewhat fishing in terms of what could be wrong.   This component is used in the VF page that I cloned and works there, but it's not working for me in my new page. 

 

 

  1. Is there somewhere I need to map components to the page or something to make them available or something else I need to check for, some reference maybe?

  2. Is there a way to get more meaningful error messages when something goes wrong like this?