• tommytx
  • NEWBIE
  • 30 Points
  • Member since 2013

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

This is really aggravating... anytime I click on a subscriber email to come to the forum it says "Not Authenicated" and I need to simply refresh the browser and all is well the correct page shows... this happens no matter whether I come from my email link or the Feed Reader link.  I have tried signing in again. but as soon as I close the browser and go to read the next email or Feed entry same thing again.  I don't have to sign in anymore, just have to hit refresh or hit the back key then fwd key again and all is well...

Does anyone have a solution for this aggravation.

 

 

Is it A NoNo to use the drop down to subscribe to a board category?  As I did and got the new stuff for a couple of days then it shut down.  I am spending 24x7 trying to learn Apex and subscribed to the Apex Board... and viewed almost all questions and by gosh even was able to comment on a few of the basic ones.. but now i get Zero threads not even the ones I started..

 

So bottom line does the rules somewhere say we have a drop down for you to subscribe to the entire section but if you use it we will shut down every last subscription you have....

 

It this is not valid can someone check my subscription to see what has gone wrong.. I was learning a lot just by reading the new questions.....  I would even go and try to find and answer to that question by research... and found a couple... was learning a lot..

 

Thanks Mgmt for looking into this.

I did check and my subscription is still in place... not unsubscribed.

 

 

 

trigger quad on Lead (before insert) {
  Lead lead = Trigger.new;
  lead = [SELECT Id, lastName, firstName FROM Lead];
  System.debug('==========> First Name ' + lead.firstName);
  System.debug('==========> Last Name ' + lead.lastName);
  lead.firstName = 'Elvis';
  lead.lastName  = 'Presley';
  update lead;
}

 I know I am off in left field, but what I am trying to do is capture the lead before being inserted into the lead data base and modify some of the fields..

The code is what I am trying to get working with no luck...

What should happen is when a lead comes in via WEB2LEAD form on the web, the trigger grabs it before insertion into the data base and attempts to modify two fields so that those two fields will be modded when I look at the record after the insertion and/or update is completed.

So where did I go wrong?

 

trigger testTrigger on Lead (before insert, before update) {
    for(Lead l: trigger.new){

 

Does trigger.new mean the trigger only works on the new lead that just came in and if a bulk insert then it will work on all the new bulk leads only and none of the existing leads?

The reason I ask, is that i want to modify an incoming lead from Web2Lead form and the only way I can imagine to get access to the data being inserted as a lead from the Web2Lead is to set a trigger to grab the lead before insert, but want to find a way to mod only the incoming lead that just happened.... So when I play with "Select" I want to be sure that I will only be selecting the newly arrived lead before it has yet been inserted.  I assume if I tamper with it here i can change it before it enters the data base.

Is there a special "Select" statement that I would use to "Select" modify and then "Update" the lead as it is inserted?

 

 

Getting my list seems to work fine, but can someone give me a pointer in the right direction to display my new found data by scanning thru the list and printing each one after the other using the debug command.

 

 

List<Lead> aa = [SELECT Id, lastName, firstName FROM Lead WHERE Ownerid = 'ZZZZYYYYYYYxxxx'];

 

// From this list, you can access individual elements:

if (!aa.isEmpty()) {
   // Execute commands

system.debug('First Name Last Name ========>' + lastName + firstName);

}

As many of you have noted I just ask too darn many questions.  I have been working on the Email2Leads solutions and have been finding code snippets here and there but have realized I just don't know enought to know what to  ask for help on.  Bottom line I need to go back to the drawing board ... learn Apex..

 

1. Unless anyone has any better idea, I have decided that Java is the basic language to learn to be able to understand Apex as I cannot find any real DUMMY tutorials on APEX.. Looks to me like if you learn basic Java I can apply it to Apex.

 

2. So maybe this thread can be used to point us Dummies to the best place to learn Java so we can understand APEX.

If you have some thoughts about super Java tutorials that will help learn Java please chime in.

 

3. I have found something that has helped me a lot and he writes any tutorial you ask for...
 and already has 64 very basic tutorials on Java now at http://www.newthinktank.com/sitemaps/ and they are all super clear high quality videos and they are all free... NO subscription...

 

4. He asks for inputs to write basic code to build tutorials... I am going to harp on him to begin writing a lot of basic APEX code as he has java... and I will begin by begging him to quickly throw out a tutorial on EMAIL2LEAD... He has a knack for explaining in detail... and with the video I can replay it 10 times till I get it and he quickly answers questions..

 

5. So please check it out and begin to leave messages requesting tutorials on APEX.. he will whip out 64 of those suckers at 2 or 3 a month for free... this guy is absoulutely amazing.  The more folks who visit and beg for a tutorial on what you are doing, the more he will do... he works for kudos only.... AMAZING..

 

When you google "Email to Lead (OR) Email2Lead (OR) LeadFromEmail" you get tons of good stuff.  Looks like this is exactly what I need, however apparently the Author is out of business and all sources seem to be gone.  It was free, and sounds like even if i could not get it to work I could use the code as one hell of a learning tool..

 

does anyone have access to a copy that you would be willing to share... I think it might help a lot of us trying to re-invent the Email2Lead classes...

 

Even snippetts from this code might be useful.

I'd love to put together a super class on the Email2Lead process for everyone to use... Anyone interested in helping... it could become as useful as the Salesforce "Web2Lead" process... and that is a really valuable tool.

 

 

Thanks

 

Does anyone have suggestions on where I can find detailed examples of using email incoming to insert leads into sales force... I have used the web2lead and its ok... but my leads are coming by email so I need to go Email2lead not web2lead.

I can find lots of stuff that I can understand regarding Email2Contacts or Email2Accounts, but little to nothing on Email2lead processes...

 

Below is a sample of the many examples of Email2Account or Contact.... and that is something similar to what I am looking for but needs to be for leads and not contacts...

 

Code:

global class EmailDemoReceive implements Messaging.Inboundemailhandler {
global Messaging.Inboundemailresult handleInboundemail(Messaging.Inboundemail email, Messaging.Inboundenvelope env ){
Account account;
Messaging.Inboundemailresult result = new Messaging.Inboundemailresult();

try{

if([Select count() from Account where Name =:email.subject ]==0){
account = new Account();
account.Name = email.subject;
insert account;
}else {
account=[select id from account where name=:email.subject ];
}

// Convert cc'd addresses to contacts
for (String address : email.ccAddresses) {
Contact contact = new Contact();
Matcher matcher = Pattern.compile('<.+>').matcher(address);

// Parse addresses to names and emails
if (matcher.find()) {
String[] nameParts = address.split('[ ]*<.+>')[0].replace('"', '').split('[ ]+');

contact.FirstName = nameParts.size() > 1 ? nameParts[0] : '';
contact.LastName = nameParts.size() > 1 ? nameParts[nameParts.size()-1] : nameParts[0];
contact.Email = matcher.group().replaceAll('[<>]', '');
} else {
contact.LastName = address;
contact.Email = address;
}

// Add if new
if ([select count() from Contact where Email = :contact.Email] == 0) {
contact.AccountId = account.Id;
insert contact;
}
}

End Code:

 

IN a nutshell here is what I need to do:

*****************************************

Parse through the incoming email message and look for the required information. For example:

An email comes in with the following:

 

Email body begin:
*****************

1. A new user has registered at http://www.mydomain.com/idx/register.html.

2. The following information was collected about the user:

3. Viewed: 6296351, 5055852, 7545845
4. First Name: Elvis
5. Last Name: Presley
6. Phone: 281-363-7159
7. Email: elvis@presley.com
8. Opt Searches: in

Email body End:
****************


// Retrieves content from the body of the email.  
// Splits each line by the terminating newline character 
// and looks for the position of the phone number and city 
   
String[] emailBody = email.plainTextBody.split('\n', 0);
String First_Name = emailBody[4].substring(12);
String Last_Name = emailBody[5].substring(12);
String Lead_Phone = emailBody[6].substring(7);
String Lead_Email = emailBody[7].substring(8);


The stringy thing above works great to parse the data but I cannot figure out how to insert it into the lead.

So I want to do something like
lead = new Lead;

lead.FirstName = First_Name;

lead.LastName = Last_Name;

lead.Phone= Lead_Phone;

lead.Email = Lead_Email;

insert lead;

 

So bottom line is that I need to understand how to add the new lead information from the email to the Sales Force Lead data base and not the Contact Data Base..

 

Any push in the right direction will be greatly appreciated..

 

Thanks

 

 

 

My understanding is that when @isTest runs any data inserted into the data base is removed at the end of the program.

Is there a way to tell it not to remove the data so I can see that all is well... or is that not possible...

I am trying to get an @isTest to work for this url and am not sure its inserting the data as when the test tries to pull it out its not there. Here is a url to the test I am running.

Here is what my fails look like... they are assert fails...  When i send data to the data base via a direct email all is well but when sending from this test thingy.. negative results.... so it appears the program is ok.. just my tester is haywire

Thanks... I have been getting a lot of help here and I really appreciate it..

 

 

13:37:54.324 (324107000)|VARIABLE_ASSIGNMENT|[74]|this.message|"oops, failed again"|0x2274f8fa
13:37:54.324 (324117000)|STATEMENT_EXECUTE|[78]
13:37:54.324 (324131000)|METHOD_EXIT|[34]|01pi0000000Lm3c|EmailDemoReceive.handleInboundemail(Messaging.InboundEmail, Messaging.InboundEnvelope)
13:37:54.324 (324140000)|VARIABLE_SCOPE_BEGIN|[34]|result|Messaging.InboundEmailResult|true|false
13:37:54.324 (324178000)|VARIABLE_ASSIGNMENT|[34]|result|{"message":"oops, failed again","success":false}|0x2274f8fa
13:37:54.324 (324186000)|STATEMENT_EXECUTE|[35]
13:37:54.324 (324207000)|SYSTEM_METHOD_ENTRY|[35]|system.Test.stopTest()
13:37:54.324 (324269000)|SYSTEM_METHOD_EXIT|[35]|system.Test.stopTest()
13:37:54.324 (324276000)|STATEMENT_EXECUTE|[37]
13:37:54.324 (324287000)|HEAP_ALLOCATE|[37]|Bytes:45
13:37:54.324 (324308000)|SYSTEM_METHOD_ENTRY|[37]|System.assert(Boolean, ANY)
13:37:54.324 (324813000)|EXCEPTION_THROWN|[37]|System.AssertException: Assertion Failed: InboundEmailResult returned a failure message
13:37:54.324 (324883000)|HEAP_ALLOCATE|[37]|Bytes:67
13:37:54.324 (324895000)|SYSTEM_METHOD_EXIT|[37]|System.assert(Boolean, ANY)
13:37:54.324 (324958000)|FATAL_ERROR|System.AssertException: Assertion Failed: InboundEmailResult returned a failure message

 

 

When I try to run the below code directly in the develpoment console, all is well but if I try to make a class out of it and run as class I get the following error.  What have I left out in my declaration?

 

 

Error: line 1, column 1: Method does not exist or incorrect signature: EmailTest()


// public class EmailTest() {
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] toAddresses = new String[] {'test@test.com'};
mail.setToAddresses(toAddresses);
mail.setSenderDisplayName('Tom Salesforce');
mail.setSubject('This is subject line');
mail.setPlainTextBody('This is the content of this email.');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
// }

When the comment is removed i try to run in the console with EmailTest(); and that is when i get the error.

 

 

 

Please help me with this test class.... Below is the code I am trying to get working... the class itself seems to work ok as it does decode incoming emails for me.  But the problem is I am trying to get the test class portiion working and it simply will not compile for me. IF you look below where I have remarked out the lines that failed with //// 4 comment bars. each one of the below //// is giving the error unexpected token.... is there a solution for this... I need to build a test code for the email program shown at the Example Code Below..  Thanks in advance for any ideas.

 

Example of Code 

 

 

 

//// Error: Compile Error: unexpected token: ',' at line etc....
//// Each line below that I have added //// gave the above error....


@IsTest
private class EmailDemoReceiveHandlerTests {

       // Create a new email and envelope object
       Messaging.InboundEmail email  = new Messaging.InboundEmail();
       Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();
      
       // Set up your data if you need to
      
       // Create the email body
       
      //// email.plainTextBody = 'This should become a note';
      //// email.fromAddress ='test@test.com';
       String contactEmail = 'jsmith@salesforce.com';
      //// email.ccAddresses = new String[] {'Jon Smith <' + contactEmail + '>'};
      //// email.subject = 'Dummy Account Name 123';
      
       EmailDemoReceive edr = new EmailDemoReceive();
      
       Test.startTest();
       Messaging.InboundEmailResult result = edr.handleInboundEmail(email, env);
       Test.stopTest();
      
       ////System.assert (result.success, 'InboundEmailResult returned a failure message');
      
       Account [] accDb = [select ID from Account where name=:email.subject];
       System.assertEquals (1, accDb.size(),'Account was not inserted');
       Contact [] cDb = [select firstname,lastname from Contact where email=:contactEmail];
       System.assertEquals (1, cDb.size(),'Contact was not inserted!');
       Contact c = CDb[0];
       System.assertEquals ('Jon', c.firstName);
       System.assertEquals ('Smith', c.LastName);
       Note [] nDb = [select body from Note where ParentID=:accDb[0].id];
       System.assertEquals (1,nDb.size(), 'A note should have been attached');
       System.assertEquals (email.plainTextBody, nDb[0].body);
      
   }
}

 

 

I am using the basic Class that everyone is familiar with that allows you to send an email to SalesForce, and the Apex code will strip out the lead from the incoming email based on rules and insert the lead into my Sales Force Data Base.

You can view the actual code that I am using at the below URL:

http://force-salesforce.blogspot.com/2011/10/how-to-unit-test-recieving-email-in.html

 

When I run a simple class in the Apex Developer Console,, I can run it over and over and use debug commands to see the results in the logs.. to determine if all is well....

 

Problem is I do not know how to activate this special class over and over to check the results... I know I can contine to send the same email over and over to see the results inserted into the data base but my question is how do I trap the logs to see if each step is working along the way.....

 

Any suggestions would be appreciated....

 

 

Not sure if I am re-inventing the wheel.  Is there a simpler way to mark the Web2Lead form with a hard wired source and have it hidden sot the client does not see it... Here is what I have done and it seems to work ok.... is this a lot of un-necessary mumbo jumbo....

 

1. First I added the lead_source to my form so I could see what format was needed to make it work....

2. Second I used the html remarks signal to disable the normal html code...

3. Using the hidden command I copies the name= and value= to be what I wanted for the lead source.

4. This seems to work as on test if did in fact not show on the client form and did infact add to the test data base with the source "REW_web.... meaning when a lead is generated on my REW (Real Estate Webmasters) site it will auto appear in my sales force lead data base and be identified by the code "REW_WEB"

5. So now I should be able to delete the entire code generated by the lead source part of the form and use only the one hidden line....  Is this an acceptable method or is the a simple one button push that I could have used to make this happen.... This is day 2 for me guys... so go easy on me...LOL.

 

<!--
<label for="lead_source">Lead Source</label><select  id="lead_source" name="lead_source"><option value="">--None--</option><option value="Web">Web</option>
<option value="Phone Inquiry">Phone Inquiry</option>
<option value="Partner Referral">Partner Referral</option>
<option value="Purchased List">Purchased List</option>
<option value="Other">Other</option>
</select><br>
-->


<input type=hidden name="lead_source" value="REW_WEB">

When I log in and click my Name then The Developer Link.. there is a long delay.. it comes up with "Loading from workspace" then in about 30 seconds a windows message comes up with "Script runs slowly do you want to stop the script"  if i click No.. it continues another 30 seconds with loading then finally completes loading then waits another 30 seconds before I can do anything.... is my sample data base corrupt.... as far as I know I am running the sandbox since a lot of items are showing in my data base along with many leads... Not mine..

 

 

This is really aggravating... anytime I click on a subscriber email to come to the forum it says "Not Authenicated" and I need to simply refresh the browser and all is well the correct page shows... this happens no matter whether I come from my email link or the Feed Reader link.  I have tried signing in again. but as soon as I close the browser and go to read the next email or Feed entry same thing again.  I don't have to sign in anymore, just have to hit refresh or hit the back key then fwd key again and all is well...

Does anyone have a solution for this aggravation.

 

 

So I have always been bothered that if you want to create tasks via workflow, you could only set certain predefined fields.  There would always have to be some custom apex trigger running to update other fields.  I wanted to come up with a standard  way to solve this.  My thought was to use the Description/Comments field on the task to drive other fields to update.

 

So when using the workflow "Create a Task" screen you would add a special string to the end of the comments such as:

 

"My real comment is this part of the message. >>Type=Meeting::Custom_Field__c=Custom Value"

 

My apex trigger will take everything after the ">>" then split it based on the "::" and update the proper fields.  This code will be a huge time saver for me so I thought I would share it.

This is my first code share so feedback is appreciated.

 

trigger WFTaskCreationExtend on Task (before insert) {
	
for(Task t:Trigger.new){
	List<string> parsedesc = t.Description.substringAfter('>>').split('::');
	t.description=t.Description.substringBefore('>>');
	if(parsedesc[0].length()>0){
		for(string p:parsedesc){
			system.debug('Update expression: '+p);
			try{
				t.put(p.substringBefore('='), p.substringAfter('='));
			}
			catch (System.SObjectException e) {
				if(e.getMessage().contains('Decimal')){
					t.put(p.substringBefore('='), decimal.valueof(p.substringAfter('=')));
				}
				else{
					System.debug('Field Error: '+e.getMessage());
				}
			}
		}
	}
}
}

 

 

 

Is it A NoNo to use the drop down to subscribe to a board category?  As I did and got the new stuff for a couple of days then it shut down.  I am spending 24x7 trying to learn Apex and subscribed to the Apex Board... and viewed almost all questions and by gosh even was able to comment on a few of the basic ones.. but now i get Zero threads not even the ones I started..

 

So bottom line does the rules somewhere say we have a drop down for you to subscribe to the entire section but if you use it we will shut down every last subscription you have....

 

It this is not valid can someone check my subscription to see what has gone wrong.. I was learning a lot just by reading the new questions.....  I would even go and try to find and answer to that question by research... and found a couple... was learning a lot..

 

Thanks Mgmt for looking into this.

I did check and my subscription is still in place... not unsubscribed.

 

 

 

I have VF page and I am using iframe in VF Page 

<apex:tab label="Fulfillment" >
<iframe src="\apex\DXGAccountFulfillment?id={!account.id}" width="100%" height="1500px"></iframe>

</apex:tab>

 

the VF PAge DXGAccountFulfillment has header and sidebar. I need to hide them for few profiles. I dont want to create 2 different VF Pages just to hide header.

Is there a way out to hide header based on profile. 

 

Thanks

 

When I'm creating a site, how do I make it a blank white page instead of having the Salesforce template?

trigger quad on Lead (before insert) {
  Lead lead = Trigger.new;
  lead = [SELECT Id, lastName, firstName FROM Lead];
  System.debug('==========> First Name ' + lead.firstName);
  System.debug('==========> Last Name ' + lead.lastName);
  lead.firstName = 'Elvis';
  lead.lastName  = 'Presley';
  update lead;
}

 I know I am off in left field, but what I am trying to do is capture the lead before being inserted into the lead data base and modify some of the fields..

The code is what I am trying to get working with no luck...

What should happen is when a lead comes in via WEB2LEAD form on the web, the trigger grabs it before insertion into the data base and attempts to modify two fields so that those two fields will be modded when I look at the record after the insertion and/or update is completed.

So where did I go wrong?

 

trigger testTrigger on Lead (before insert, before update) {
    for(Lead l: trigger.new){

 

Does trigger.new mean the trigger only works on the new lead that just came in and if a bulk insert then it will work on all the new bulk leads only and none of the existing leads?

The reason I ask, is that i want to modify an incoming lead from Web2Lead form and the only way I can imagine to get access to the data being inserted as a lead from the Web2Lead is to set a trigger to grab the lead before insert, but want to find a way to mod only the incoming lead that just happened.... So when I play with "Select" I want to be sure that I will only be selecting the newly arrived lead before it has yet been inserted.  I assume if I tamper with it here i can change it before it enters the data base.

Is there a special "Select" statement that I would use to "Select" modify and then "Update" the lead as it is inserted?

 

 

Hello Guys,

 

I am new to Salesforce and would like to know if someone could tell me how to carry out uni tests?

 

I have got some idea: but not sure where, how and what to do the test on exactly

 

@isTest

public class AccountInvoicerTest

{

public static testMethod void TestInvoiceAccount()

 {

Test.startTest();

Test.stopTest();

  }

system.assert();

system.assertequals();

 

Helo would be much appreciated :)

 

Thanks

I've never created test methods before and I'm having difficulties understanding the workbooks.  Can anyone help me out here?  I successfully (or so I think) created one test that works, but I'm stuck on the others....

 

public class TimeOffRequestFlow {

public Flow.Interview.Time_Off_request myFlow { get; set; }

public String getmyID() {
if (myFlow==null) return '';
else return myFlow.TimeOffRequestID;
}

public PageReference getOID(){
PageReference p = new PageReference('/' + getmyID());
p.setRedirect(true);
return p;
}
    //-------------------------  tests --------------------------
    @IsTest
    static void testMyClass(){
    	ApexPages.currentPage().getParameters().put('id','blablabla');
    	timeoffrequestflow obj = new timeoffrequestflow();
    }                          
                      
}

 

  • February 08, 2013
  • Like
  • 0

Hi,

 

We are using SFDC email to case.

Is there a way to search a text area (body of the email) for a unique number and populate this to a field within the case object?

 

The unique number always follows this format e.g FY554077

(2 letters followed by 6 numbers).

 

Many thanks

 

 

Getting my list seems to work fine, but can someone give me a pointer in the right direction to display my new found data by scanning thru the list and printing each one after the other using the debug command.

 

 

List<Lead> aa = [SELECT Id, lastName, firstName FROM Lead WHERE Ownerid = 'ZZZZYYYYYYYxxxx'];

 

// From this list, you can access individual elements:

if (!aa.isEmpty()) {
   // Execute commands

system.debug('First Name Last Name ========>' + lastName + firstName);

}

We are migrating our site to a Java framework called the Play Framework. We currently have a PHP site and the site adds items to Salesforce via the API. The PHP code we use is below and I am wondering if you can help me find a Java version. I am new to java so an example would be very helpful. Our form submits to a controller already so we have to tie the API in somehow so that we can still submit the form.

PHP Code:

 

function setSalesforceAsync($email, $tag)
{
    $url = 'https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8';
    $params = array(
        'oid'=>urlencode("xxxxxxxxxxxxxx"),
        'lead_source'=>urlencode("web"),
        'last_name'=>$email,
        'email'=>$email
    );
        
    foreach ($params as $key => &$val) {
      if (is_array($val)) $val = implode(',', $val);
      $post_params[] = $key.'='.urlencode($val);
    }
    
    $post_string = implode('&', $post_params);
 
    $parts=parse_url($url);
 
    $fp = fsockopen("ssl://".$parts['host'],
        isset($parts['port'])?$parts['port']:443,
        $errno, $errstr, 30);
 
    // Data goes in the path for a GET request
    if('GET' == $type) $parts['path'] .= '?'.$post_string;
 
    $out = "$type ".$parts['path']." HTTP/1.1\r\n";
    $out.= "Host: ".$parts['host']."\r\n";
    $out.= "Content-Type: application/x-www-form-urlencoded\r\n";
    $out.= "Content-Length: ".strlen($post_string)."\r\n";
    $out.= "Connection: Close\r\n\r\n";
    // Data goes in the request body for a POST request
    if ('POST' == $type && isset($post_string)) $out.= $post_string;
 
    fwrite($fp, $out);
    fclose($fp);
  }

 

 

As many of you have noted I just ask too darn many questions.  I have been working on the Email2Leads solutions and have been finding code snippets here and there but have realized I just don't know enought to know what to  ask for help on.  Bottom line I need to go back to the drawing board ... learn Apex..

 

1. Unless anyone has any better idea, I have decided that Java is the basic language to learn to be able to understand Apex as I cannot find any real DUMMY tutorials on APEX.. Looks to me like if you learn basic Java I can apply it to Apex.

 

2. So maybe this thread can be used to point us Dummies to the best place to learn Java so we can understand APEX.

If you have some thoughts about super Java tutorials that will help learn Java please chime in.

 

3. I have found something that has helped me a lot and he writes any tutorial you ask for...
 and already has 64 very basic tutorials on Java now at http://www.newthinktank.com/sitemaps/ and they are all super clear high quality videos and they are all free... NO subscription...

 

4. He asks for inputs to write basic code to build tutorials... I am going to harp on him to begin writing a lot of basic APEX code as he has java... and I will begin by begging him to quickly throw out a tutorial on EMAIL2LEAD... He has a knack for explaining in detail... and with the video I can replay it 10 times till I get it and he quickly answers questions..

 

5. So please check it out and begin to leave messages requesting tutorials on APEX.. he will whip out 64 of those suckers at 2 or 3 a month for free... this guy is absoulutely amazing.  The more folks who visit and beg for a tutorial on what you are doing, the more he will do... he works for kudos only.... AMAZING..

 

My understanding is that when @isTest runs any data inserted into the data base is removed at the end of the program.

Is there a way to tell it not to remove the data so I can see that all is well... or is that not possible...

I am trying to get an @isTest to work for this url and am not sure its inserting the data as when the test tries to pull it out its not there. Here is a url to the test I am running.

Here is what my fails look like... they are assert fails...  When i send data to the data base via a direct email all is well but when sending from this test thingy.. negative results.... so it appears the program is ok.. just my tester is haywire

Thanks... I have been getting a lot of help here and I really appreciate it..

 

 

13:37:54.324 (324107000)|VARIABLE_ASSIGNMENT|[74]|this.message|"oops, failed again"|0x2274f8fa
13:37:54.324 (324117000)|STATEMENT_EXECUTE|[78]
13:37:54.324 (324131000)|METHOD_EXIT|[34]|01pi0000000Lm3c|EmailDemoReceive.handleInboundemail(Messaging.InboundEmail, Messaging.InboundEnvelope)
13:37:54.324 (324140000)|VARIABLE_SCOPE_BEGIN|[34]|result|Messaging.InboundEmailResult|true|false
13:37:54.324 (324178000)|VARIABLE_ASSIGNMENT|[34]|result|{"message":"oops, failed again","success":false}|0x2274f8fa
13:37:54.324 (324186000)|STATEMENT_EXECUTE|[35]
13:37:54.324 (324207000)|SYSTEM_METHOD_ENTRY|[35]|system.Test.stopTest()
13:37:54.324 (324269000)|SYSTEM_METHOD_EXIT|[35]|system.Test.stopTest()
13:37:54.324 (324276000)|STATEMENT_EXECUTE|[37]
13:37:54.324 (324287000)|HEAP_ALLOCATE|[37]|Bytes:45
13:37:54.324 (324308000)|SYSTEM_METHOD_ENTRY|[37]|System.assert(Boolean, ANY)
13:37:54.324 (324813000)|EXCEPTION_THROWN|[37]|System.AssertException: Assertion Failed: InboundEmailResult returned a failure message
13:37:54.324 (324883000)|HEAP_ALLOCATE|[37]|Bytes:67
13:37:54.324 (324895000)|SYSTEM_METHOD_EXIT|[37]|System.assert(Boolean, ANY)
13:37:54.324 (324958000)|FATAL_ERROR|System.AssertException: Assertion Failed: InboundEmailResult returned a failure message

 

 

When I try to run the below code directly in the develpoment console, all is well but if I try to make a class out of it and run as class I get the following error.  What have I left out in my declaration?

 

 

Error: line 1, column 1: Method does not exist or incorrect signature: EmailTest()


// public class EmailTest() {
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] toAddresses = new String[] {'test@test.com'};
mail.setToAddresses(toAddresses);
mail.setSenderDisplayName('Tom Salesforce');
mail.setSubject('This is subject line');
mail.setPlainTextBody('This is the content of this email.');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
// }

When the comment is removed i try to run in the console with EmailTest(); and that is when i get the error.

 

 

Hello 

 

a webform collects users information, has 1,2,3,4 steps , 

 

Currently all infomation is collected from the website is creating a record in every step of the website form,

 

That is, 

User one fills out the form in step one if they continue to step 2, a record is created in Salesforce, the user continues to step 3 of the form a new record is also created until the form is in step four which also creates a new record in Salesforce, making it 3 of the same record.

 

I need to know how can I create a call method that allows the records in Salesforce not to be Created but instead Updated based on the user's email address during a form creation.

 

 

That is when the initial record is created in Salesforce it includes an email address, so when the user goes to step two, instead of creating a new record in salesforce, it should be updated with the new record information.

 

Please this is quite urgent HELP.

 

Regards.