• DRSnyder
  • NEWBIE
  • 25 Points
  • Member since 2009

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

I'm trying to deploy three Apex classes to a Configuration-Only sandbox. Two of the classes, MissingValueException and NewLeadContact, are my actual classes. NewLeadContactTest is a UnitTest class, that tests the other two classes. All UnitTests pass and I've got 98% code coverage.

 

Problem is... I'm getting the error messages below.

 

classes/MissingValueException.cls:Not available for deploy for this organization

classes/MissingValueException.cls-meta.xml:Not available for deploy for this organizationclasses/newLeadContact.cls-meta.xml:Not available for deploy for this organization

classes/newLeadContactTest.cls:Not available for deploy for this organization

classes/newLeadContactTest.cls-meta.xml:Not available for deploy for this organization

classes/newLeadContact.cls:Not available for deploy for this organization

 

I'm doing my deployment using the Ant-based Migration Tool. 

 

Here's the line from build.xml where I try and check my deployment...

 

<target name="checkDeployment">

<sf:deploy username="${sf.destinationusername}" password="${sf.destinationpassword}" serverurl="${sf.destinationserverurl}" deployRoot="sourceMetadata" runAllTests="true" checkOnly="true" />

</target>

 

What's wrong, that causes this error message?

I'm having a problem sending e-mail from an APEX controller extension. Here's the code followed by the results from the debug log.

 

public class leadExtension {

public leadExtension(ApexPages.StandardController controller) {
this.lead = (Lead)controller.getRecord();

// Create a new single email message object
// that will send out a single email.
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

// Strings to hold the email addresses to which you are sending the email.
String[] toAddresses = new String[] {'********@hsabank.com'};

// Assign the addresses for the To list to the mail object.
mail.setToAddresses(toAddresses);

// Specify the address used when the recipients reply to the email.
mail.setReplyTo('********@hsabank.com');

// Specify the name used as the display name.
mail.setSenderDisplayName('HSA Bank');

// Specify the subject line for your email address.
mail.setSubject('New Contact Request: ' + lead.FirstName);

// Set to True if you want to BCC yourself on the email.
mail.setBccSender(false);

// Optionally append the salesforce.com email signature to the email.
// The email address of the user executing the Apex Code will be used.
mail.setUseSignature(false);

// Specify the text content of the email.
mail.setPlainTextBody('Please add this new contact...');

mail.setHtmlBody('Please add this new contact...');

// Send the email you have created.
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
}

private final Lead lead;
}
<apex:page tabStyle="Lead" standardController="Lead" extensions="leadExtension" >
    <apex:form >
    <apex:sectionHeader title="New Contact Request" />
    <h1>Notice Sent</h1>
    <p>
        Congratulations, your request to add a new Contact has been submitted. 
    </p>
    <apex:outputField title="First Name:" value="{!Lead.FirstName}"/>
    </apex:form>
</apex:page>
Element thePage called method {!checkManageability} returned type PageReference: none
***Begining Page Log for /apex/New_Contact_Request
20090801203603.582:Class.leadExtension.<init>: line 38, column 42: Single email queued for send (pending commit) : replyTo: ********@hsabank.com, subject: New Contact Request: Randy, senderDisplayName: HSA Bank, bccSender: false, saveAsActivity: true, useSignature: false, toAddresses: [********@hsabank.com], plainTextBody: Please add this new contact..., htmlBody: Please add this new contact...,
20090801203603.582:Class.leadExtension.<init>: line 39, column 9: Email result true
20090801203603.582:External entry point: returning from end of method public leadExtension<Constructor>(ApexPages.StandardController) in 38 ms
Cumulative profiling information:

No profiling information for SOQL operations.

No profiling information for SOSL operations.

No profiling information for DML operations.

1 most expensive method invocations:
Class.leadExtension: line 3, column 12: public leadExtension<Constructor>(ApexPages.StandardController): executed 1 time in 38 ms


***Ending Page Log for /apex/New_Contact_Request?id=00Q8000000SRUBJ&core.apexpages.devmode.url=1&scontrolCaching=1

 

I suppose I should first point out that I'm fairly new to Salesforce, and this is the first class I've tried to develop on my own. So, please be gentle with me! :smileywink: 

 

Based on what I can see, everything appears to be working fine, and the associated Visualforce page displays without error. The code is running inside leadExtension constructor. The problem is that the e-mail never arrives. I've got a couple different Developer Edition orgs, and I've tied this code in both. I get the same result.

 

I get other e-mails from Salesforce, like the security token re-set, e-mail change confirmation, etc. So, I know mail is getting through from them.

 

Also, I checked the Email Logs, and it doesn't appear to show any e-mails being sent at the time that I tried to send them.

 

So, I'm a little stumped. Can somebody point me in the right direction.

Message Edited by DRSnyder on 08-01-2009 02:08 PM
Message Edited by DRSnyder on 08-03-2009 11:15 AM

I'm trying to deploy three Apex classes to a Configuration-Only sandbox. Two of the classes, MissingValueException and NewLeadContact, are my actual classes. NewLeadContactTest is a UnitTest class, that tests the other two classes. All UnitTests pass and I've got 98% code coverage.

 

Problem is... I'm getting the error messages below.

 

classes/MissingValueException.cls:Not available for deploy for this organization

classes/MissingValueException.cls-meta.xml:Not available for deploy for this organizationclasses/newLeadContact.cls-meta.xml:Not available for deploy for this organization

classes/newLeadContactTest.cls:Not available for deploy for this organization

classes/newLeadContactTest.cls-meta.xml:Not available for deploy for this organization

classes/newLeadContact.cls:Not available for deploy for this organization

 

I'm doing my deployment using the Ant-based Migration Tool. 

 

Here's the line from build.xml where I try and check my deployment...

 

<target name="checkDeployment">

<sf:deploy username="${sf.destinationusername}" password="${sf.destinationpassword}" serverurl="${sf.destinationserverurl}" deployRoot="sourceMetadata" runAllTests="true" checkOnly="true" />

</target>

 

What's wrong, that causes this error message?

I'm having a problem sending e-mail from an APEX controller extension. Here's the code followed by the results from the debug log.

 

public class leadExtension {

public leadExtension(ApexPages.StandardController controller) {
this.lead = (Lead)controller.getRecord();

// Create a new single email message object
// that will send out a single email.
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

// Strings to hold the email addresses to which you are sending the email.
String[] toAddresses = new String[] {'********@hsabank.com'};

// Assign the addresses for the To list to the mail object.
mail.setToAddresses(toAddresses);

// Specify the address used when the recipients reply to the email.
mail.setReplyTo('********@hsabank.com');

// Specify the name used as the display name.
mail.setSenderDisplayName('HSA Bank');

// Specify the subject line for your email address.
mail.setSubject('New Contact Request: ' + lead.FirstName);

// Set to True if you want to BCC yourself on the email.
mail.setBccSender(false);

// Optionally append the salesforce.com email signature to the email.
// The email address of the user executing the Apex Code will be used.
mail.setUseSignature(false);

// Specify the text content of the email.
mail.setPlainTextBody('Please add this new contact...');

mail.setHtmlBody('Please add this new contact...');

// Send the email you have created.
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
}

private final Lead lead;
}
<apex:page tabStyle="Lead" standardController="Lead" extensions="leadExtension" >
    <apex:form >
    <apex:sectionHeader title="New Contact Request" />
    <h1>Notice Sent</h1>
    <p>
        Congratulations, your request to add a new Contact has been submitted. 
    </p>
    <apex:outputField title="First Name:" value="{!Lead.FirstName}"/>
    </apex:form>
</apex:page>
Element thePage called method {!checkManageability} returned type PageReference: none
***Begining Page Log for /apex/New_Contact_Request
20090801203603.582:Class.leadExtension.<init>: line 38, column 42: Single email queued for send (pending commit) : replyTo: ********@hsabank.com, subject: New Contact Request: Randy, senderDisplayName: HSA Bank, bccSender: false, saveAsActivity: true, useSignature: false, toAddresses: [********@hsabank.com], plainTextBody: Please add this new contact..., htmlBody: Please add this new contact...,
20090801203603.582:Class.leadExtension.<init>: line 39, column 9: Email result true
20090801203603.582:External entry point: returning from end of method public leadExtension<Constructor>(ApexPages.StandardController) in 38 ms
Cumulative profiling information:

No profiling information for SOQL operations.

No profiling information for SOSL operations.

No profiling information for DML operations.

1 most expensive method invocations:
Class.leadExtension: line 3, column 12: public leadExtension<Constructor>(ApexPages.StandardController): executed 1 time in 38 ms


***Ending Page Log for /apex/New_Contact_Request?id=00Q8000000SRUBJ&core.apexpages.devmode.url=1&scontrolCaching=1

 

I suppose I should first point out that I'm fairly new to Salesforce, and this is the first class I've tried to develop on my own. So, please be gentle with me! :smileywink: 

 

Based on what I can see, everything appears to be working fine, and the associated Visualforce page displays without error. The code is running inside leadExtension constructor. The problem is that the e-mail never arrives. I've got a couple different Developer Edition orgs, and I've tied this code in both. I get the same result.

 

I get other e-mails from Salesforce, like the security token re-set, e-mail change confirmation, etc. So, I know mail is getting through from them.

 

Also, I checked the Email Logs, and it doesn't appear to show any e-mails being sent at the time that I tried to send them.

 

So, I'm a little stumped. Can somebody point me in the right direction.

Message Edited by DRSnyder on 08-01-2009 02:08 PM
Message Edited by DRSnyder on 08-03-2009 11:15 AM