• Aaron Persich 15
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Hello,

I am trying to push an Apex Class which auto converts a lead into a contact.  When I try to deploy this in production I get the following error.  I am not too familiar with Apex Classes and not sure how to resolve this.

Your code coverage is 38%. You need at least 75% coverage to complete this deployment.
 
Public class AutoConvertLeads
{
    @InvocableMethod
    public static void LeadAssign(List<Id> LeadIds)
    {
            Database.LeadConvert Leadconvert = new Database.LeadConvert();
            Leadconvert.setLeadId(LeadIds[0]);
            LeadStatus Leads= [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true LIMIT 1];
            Leadconvert.setConvertedStatus(Leads.MasterLabel);
            Leadconvert.setDoNotCreateOpportunity(TRUE); //Remove this line if you want to   create an opportunity from Lead Conversion 
            Database.LeadConvertResult Leadconverts = Database.convertLead(Leadconvert);
            System.assert(Leadconverts.isSuccess());
   }
}


Any help is much appreciated.

Thanks,

Aaron
 
Hello,
 
I have created a “Marketing Request” object and am trying to create a simple tab which when selected it will populate a visualforce flow with a form to fill out.  When the form is completed then it will create a Marketing Request record.  I am trying to redirect the user to the newly created record but I keep getting this error when I test it.
 
Invalid Page Redirection
The page you attempted to access has been blocked due to a redirection to an outside website or an improperly coded link or button. Please contact your salesforce.com Administrator for assistance. For more information, see Insufficient Privileges Errors. 

Click here to return to the previous page.
 
<apex:page standardController="Marketing_Request__c" Showchat="False" showheader="True" standardStylesheets="True">

<flow:interview name="Marketing_Flow" finishLocation="/{!$CurrentPage.parameters.id}">

<apex:param name="varMarketingID" value="{!Marketing_Request__c.Id}"/>
</flow:interview>
</apex:page>

User-added image

User-added image

User-added image
Any help is much appreciated.

Thanks,

Aaron
Hello,

I am trying to create a simple visualforce page on the task record with a flow and custom button.  I know a lot of people have had this same error message and I have read some posts but I have no idea on how to resolve this.  Any help is much appreciated.
 
<apex:page standardController="Task" Showchat="False" showheader="True" standardStylesheets="True">
    
    <style>
        .myFormStyle {
            background-color: blue;
        }
    </style>
   
               <flow:interview name="Close_Task" finishLocation="/{!$CurrentPage.parameters.id}">
                <apex:param name="varTask" value="{!Opportunity.Id}"/>
            </flow:interview>
                

</apex:page>

 
Hello,

I am trying to create a simple visualforce page on the task record with a flow and custom button.  I know a lot of people have had this same error message and I have read some posts but I have no idea on how to resolve this.  Any help is much appreciated.
 
<apex:page standardController="Task" Showchat="False" showheader="True" standardStylesheets="True">
    
    <style>
        .myFormStyle {
            background-color: blue;
        }
    </style>
   
               <flow:interview name="Close_Task" finishLocation="/{!$CurrentPage.parameters.id}">
                <apex:param name="varTask" value="{!Opportunity.Id}"/>
            </flow:interview>
                

</apex:page>

 
Hi There,

I am trying to create a custome object to trigger a county name on entry of an address in Salesforce. I have the steps to do it but I need clear instructions on how to do it. Below is the steps. If someone could please let me know how to do this, it would be great.

1. Create an object that contains the data of the zip codes. (How and where do I create this and how do we connect the zip codes to the county? We are working with 50 county's and around 2400 zip codes that need to be connected)
2. Create a trigger for contact created or edited, and one for account as well.
3. Use the zip code to look up the county in the custom object, and fill in the field on the contact or account record.

Thanks in advance,
Janine