• Abdul Razzaq
  • NEWBIE
  • 80 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 10
    Questions
  • 42
    Replies
Hi,

Is there anyway to remove the setup tab, so that standard users can not access this?
I have set up permissions to limit there access to folders, but they can still click on manage users and see other peoples profiles, which i don't want them to have access to.

User-added image

How to implement sales cloud?

how to implement service cloud?

My email handler works fine for if condition.. but not for else... 
following is my code..:-

 

global class emailhandler2 implements Messaging.InboundEmailHandler {


  global Messaging.InboundEmailResult handleInboundEmail(messaging.inboundemail email, messaging.inboundenvelope envelope)
  {
  
  WeatherCheckIn__c[] newWeathercheckIn = new WeatherCheckIn__c[0];
  
    String subject = email.subject;
   
   String[] emailsub = email.subject.split('#', 0);
   String country = emailsub[0];
   String city = emailsub[1];
   string[] emailaddressr = envelope.fromaddress.split('@',0);
   string lastnamer = emailaddressr[0];
 system.debug('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'+lastnamer);
     Xmlparsercls obj = new Xmlparsercls(city, country);
     list<string> ls = obj.Parsexmlfile();
     
     list<contact> dulast =[select id, lastname from contact where lastname= :lastnamer];
     
     for(contact x : dulast){
     
        if(x.lastname != lastnamer) {
     
     system.debug('//////////////////////////////////////////x.lastname!=lastnamer//////////'+x.lastname);
      
   
   Contact c = new Contact();
   
      c.LastName = lastnamer;
      
      insert c;
       WeatherCheckIn__c wcic = new WeatherCheckIn__c();
        wcic.City__c = city;
        wcic.Country__c = country;
        wcic.Contact__c = c.id;
      newWeathercheckIn.add(new WeatherCheckIn__c(City__c = city,
      Country__c = country));
      insert wcic;
       WeatherCheckOut__c wechou= new WeatherCheckOut__c();
   
   wechou.Location__c = ls[0].substring(24,75);
   wechou.Temperature__c = ls[0].substring(88,100);
   wechou.DewPoint__c = ls[0].substring(110,120);
   wechou.Contact__c = c.id;
   insert wechou;
   
   }
    
     
     else{
  
   system.debug('############################################# x.lastname==lastnamer ####'+x.lastname);
   
  
 WeatherCheckIn__c wcic = new WeatherCheckIn__c();
        wcic.City__c = city;
        wcic.Country__c = country;
        wcic.Contact__c = x.id;
      newWeathercheckIn.add(new WeatherCheckIn__c(City__c = city,
      Country__c = country));
      insert wcic;
       WeatherCheckOut__c wechou= new WeatherCheckOut__c();
   
   wechou.Location__c = ls[0].substring(24,75);
   wechou.Temperature__c = ls[0].substring(88,100);
   wechou.DewPoint__c = ls[0].substring(110,120);
   wechou.Contact__c = x.id;
   insert wechou;
   
   update x;
   }
        }
     system.debug('----------------------------------------subject--------------------'+subject);
       system.debug('--------------------------------------------------country--'+country);
       system.debug('--------------------------------------------city---------'+city);
  
      
       system.debug('............................................................................................................'+ls[0].substring(24,75)+ls[0].substring(88,100)+ls[0].substring(110,120));
      
    Messaging.InboundEmailresult result = new Messaging.InboundEmailResult();
    result.message = 'Your mail has been recieved'+ls;
  
    return result;
  }
}

Unable to retrieve information from the email sent to salesforce.

I am probably trying to check information through debug logs.. 

help ASAP!!

global class processApplicant implements 
        Messaging.InboundEmailHandler {
       
 global Messaging.InboundEmailResult handleInboundEmail(
  Messaging.InboundEmail email, 
  Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = 
        new Messaging.InboundEmailresult();
        
        system.debug('---------------------------------------------------------------result1------'+result);
        // Captures the sender's email address
String emailAddress = envelope.fromAddress;
        system.debug('-----------------------------------------------------------------emailaddress----'+emailaddress); 
  // Retrieves the sender's first and last names
String fName = email.fromname.substring(
        0,email.fromname.indexOf(' '));
String lName = email.subject;
         system.debug('--------------------------------------------------------------fname-------'+fname);
                 system.debug('--------------------------------------------------------lname-------------'+lname);
  // Retrieves content from 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 phoneNumber = emailBody[0].substring(6);
String city = emailBody[1].substring(5);
        
        system.debug('---------------------------------------------------------------------'+result);
return result;
    }   
}

public class DispatcherContactNewController {

    public DispatcherContactNewController(ApexPages.StandardController controller) {
        this.controller = controller;
    }
   
    public PageReference Redir() {
PageReference newPage;
    PageReference standardpage = New PageReference('/00Q/e?retURL=%2F00Q%2Fo&RecordType=012900000011wvV&ent=Lead&nooverride=1');
        RecordType r;
        r = [Select id,developerName from RecordType Where SobjectType='Lead' And id = :ApexPages.currentPage().getParameters().get('RecordType')];
        
        if ( r.developerName == 'LeadVisualforcePage') {
        
        System.debug('----------------------------------------------------------------------');
        
            newPage = Page.leadtask;
            newPage.setRedirect(true);
            return newPage;
        } else {
        
         System.debug('**********************************************************************');
         
         return standardpage;
        }

    }

    private final ApexPages.StandardController controller;
}
I have a requirement. Where I created a custom email button, when Email button is clicked it sends email to the value present in the email field. And if the value is null it should give an error message. I accomplised one part of sending email, however could anybody help on the error message scenario. 
A trigger to insert email value in custom object from lead object (lookup).
Code:-

location.replace('/email/author/emailauthor.jsp?retURL=/{!Lead.Id}&p3_lkid={!Lead.Email}&rtype=00Q&p2_lkid={!Lead.Id}&template_id=00XA0000000RfyB&p5=&save=1');

Error:-

The value of the "p3_lkid" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information. 

Code:-

location.replace('/email/author/emailauthor.jsp?retURL=/{!Lead.Id}&p3_lkid={!Lead.Email}&rtype=00Q&p2_lkid={!Lead.Id}&template_id=00XA0000000RfyB&p5=&save=1');

Error:-

The value of the "p3_lkid" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information. 
 

I don't know where I am going wrong. I am being redirected to other Vfpage yet niether URL changes nor I am able to fetch the values from one Vfpage to other.

And I am using single controller for both Vfpages. Agony is I am getting two develpment mode windows of two visualforce page; when I click "edit".

Vfpage one 

<apex:page controller="WrapperAccountextension">
   <apex:form >
        <apex:pageBlock title="Account List">
        
            <apex:pageBlockButtons >
                <apex:commandButton value="Edit" action="{!geteditormoz}" rerender="out"/>
            </apex:pageBlockButtons>
           
            <apex:pageBlockTable value="{!Accountsz}" var="Acc">
                <apex:column headerValue="Action">
                   
                    <apex:inputCheckbox value="{!Acc.selected}"/>
                </apex:column>
                
                <apex:column value="{!Acc.con.Name}" />
                <apex:column value="{!Acc.con.Phone}" />
                <apex:column value="{!Acc.con.Fax}"/>
                <apex:column value="{!Acc.con.AnnualRevenue}"/>
                <apex:column value="{!Acc.con.AccountNumber}"/>
            </apex:pageBlockTable>
        
        </apex:pageBlock>
        </apex:form>
</apex:page>

 

=========================================================================================================================================================================================================================================================================================================================Vfpage two:-

<apex:page controller="WrapperAccountextension">
<apex:form >
 <apex:pageblock mode="InlineEdit">
        <apex:pageBlockButtons >
        <apex:commandButton value="Save" action="{!rasavez}"/>
        </apex:pageBlockButtons>
      
               <apex:pageBlockTable value="{!selectedAccountsz}" var="Rec" id="out" title="Selected Accounts" columnsWidth="400px,400px">
                    <apex:column headerValue="Account Name">
                        <apex:outputField value="{!Rec.name}"/>
                    </apex:column>   
                    <apex:column headerValue="Phone">
                        <apex:outputField value="{!Rec.Phone}"/>
                    </apex:column>             
                    <apex:column headerValue="Fax">
                    <apex:outputField value="{!Rec.Fax}"/>
                    </apex:column>
                    <apex:column headerValue="Annual Revenue">
                    <apex:outputField value="{!Rec.AnnualRevenue}"/>
                    </apex:column>
                    <apex:column headerValue="Account Number">
                    <apex:outputfield value="{!Rec.AccountNumber}"/>
                    </apex:column>
                </apex:pageBlockTable>   
               
          </apex:pageblock>
</apex:form>
</apex:page>

=========================================================================================================================================================================================================================================================================================================================Controller:-

public class WrapperAccountextension {


Public pagereference rasavez(){

Update selectedAccountsz;
return null;
}

Public Pagereference editmoderz(){

return null;
}

public PageReference geteditormoz(){
Pagereference ldkedit = New PageReference('/apex/WrapperAccountlsteditera');
processSelectedz();

ldkedit.setRedirect(true);

return ldkedit;
}
    
 public List<cAccountz> accListz {get; set;}
  public List<Account> selectedAccountsz{get; set;}
//Adding the Records to inner class and to get the values for page block table.
  public List<cAccountz> getAccountsz(){
        if(accListz == null){
            accListz = new List<cAccountz>();
            for(Account acc : [select Id, Name, Phone,Fax,AnnualRevenue,AccountNumber from Account limit 25]){
                  accListz.add(new cAccountz(acc));
            }
         }
       return accListz;
   }  
//on button click it will show the list of records what we have selected.
  public PageReference processSelectedz(){     
  
  
        selectedAccountsz= new List<Account>();
        for(cAccountz cCon : getAccountsz()) {
            if(cCon.selected == true){
                selectedAccountsz.add(cCon.con);
                
            }
        }            
        return null;
   }
  //  Inner class for capture the records
  public class cAccountz {
        public Account con {get; set;}
        public Boolean selected {get; set;}
        public cAccountz(Account c) {
            con = c;
            selected = false;
        }
   }
     
}

 

Thanks and Regards,

Razzzaq.

This is my code:-

public class DispatcherContactNewController {

    public DispatcherContactNewController(ApexPages.StandardController controller) {
        this.controller = controller;
    }
   
    public PageReference Redir() {

        PageReference newPage;
        PageReference standardpage = New PageReference('/00Q/e?retURL=%2F00Q%2Fo&RecordType=012900000011wvV&ent=Lead&nooverride=1');
        
        RecordType r;
        r = [Select developerName from RecordType Where SobjectType='Lead' And id = :ApexPages.currentPage().getParameters().get('RecordType')];
        
        if ( r.developerName == 'LeadVisualforcePage') {
        
        System.debug('----------------------------------------------------------------------');
        
            newPage = Page.leadtask;
            
            return newPage;
        } else {
        
         System.debug('**********************************************************************');
         
         return standardpage;
        }

    }

    private final ApexPages.StandardController controller;
}

Very inexperienced developer here - I appreciate your patience and help.

I'm attempting to use process builder to update the stage on an opportunity when a task subject contains "has been signed by all parties". 

In process builder I have the task object starting the process when a record is created or updated.  The criteria for the action group is "When conditions are met".  The condition is Field [Task].Subject contains string "has been signed by all parties" - conditions = any (OR).  The immediate action is Record: [Task].Account ID.Opportunities update Field: Stage Picklist Value = Closed Won

When I test the workflow by adding a task with "has been signed by all parties" in the subject on the opportunity and save the record, the stage is not updated.  Any help is appreciated.
Hi community,

I've been banging my head against the wall all afternoon, trying to use the Data Import Wizard to let me bulk upload a number of new emails we've collected on our existing accounts. I can't seem to get the wizard to add these new emails to the accounts. Here are the fields I've got filled out:


Account ID                  Contact: Record Owner    Contact: Last Name    Contact: Brand Name    Contact: Title    Contact: Email
0011a000002oXFiAAM    Cy Sack                      N/A                             2 Day Designs                                     sales@2-DayDesigns.com

When the wizard runs, it says it goes through successfully, but no new contacts are created in Salesforce, it just says it updates brands.

Anyone have any idea why this isn't work? Any help is greatly appreciated!
Hi,

I am trying to figure out a way to auto-populate a lookup field with a value on initial entry(clicking New Contact) into the Contact screen.
The lookup field is a lookup to a custom object called Project Centre   ( API Name is Project_Centre__c ). The Project Centre can take on up to 5 different record values (won't list all  5, such as "Aisling Shangan" or "Aisling Woodhazel") 

I wish to set the value in the Project Centre lookup field depending on the currently logged in User's Role. So for example, if the current logged-in User's Role is "Aisling Shangan Staff" then I wish the Project Centre lookup value on the Contact object to be set to the value of "Aisling Shangan".

I understand that writing an Apex trigger may be the only way of achieving this. I haven't written a trigger yet, so any help would be much appreciated!
Hi,

I created an apex class to delete Account List record which has no Account List Items when I execute the class, it's not deleting the Account List with no Account List Item records.

Objects involved.

Account_List_vod__c - is the master of object Account List Item (Account_List_Item_vod__c)

Affiliation_vod__c - this object has no relation at all to Account List and Account List Item objects.


Requirements:

1. Get all the active users with Profile name that contains Eisai_Epilepsy or Eisai_PrimaryCare then order by Profile name.
2. Put all the active result query to a set.
3. Query all Account List records where ownerId is in the Active user set.
4. Iterate or loop on the Account List records, check if the Account_List_Item_Count__c field is less than 1 (No account list item records), then add it to a list named accListToDelete.
5. Lastly, delete all the records inside accListToDelete.

I think my logic is partly correct but I am just new in apex coding. Actually, this is the first time I tried to code.

Below is the actual code
.Delete Class


Actual code:

public class Eisai_AccountListDeletion_cls {
    Set<Id> userIdsSet = new Set<Id>();
    List<User> activeUSerList;
    List<Account_List_vod__c> accListRecsList;
    List<Account_List_Item_vod__c> accListItem;
    List<Account_List_vod__c> accListToDelete = new List<Account_List_vod__c>();
   
    //1st block
    public Set<Id> getActiveUserIds(){
       
            activeUSerList = new List<User>([SELECT Id,Profile_Name_esi__c
                                             FROM User
                                             WHERE (Profile_Name_vod__c LIKE '%Eisai_Epilepsy%' OR Profile_Name_vod__c LIKE '%Eisai_PrimaryCare%') 
                                             AND IsActive = TRUE ORDER BY Profile_Name_vod__c]);
       
            for(User userIds : activeUSerList){
                userIdsSet.add(userIds.Id);
            }
        System.debug('User id: ' + userIdsSet);
        return userIdsSet;
    }//end of 1st block
   
    //2nd block
    public void getAccListRecords(){
       
    Integer count = 1; 
    accListRecsList = new List<Account_List_vod__c>([SELECT Id, Name, Icon_Name_vod__c, Account_List_Item_Count__c
                                                    FROM Account_List_vod__c
                                                    WHERE Name ='HO_RADY\'S CHILDREN\'S UCSD' AND OwnerId In: userIdsSet]); 
       
            for(Account_List_vod__c accListRec : accListRecsList){
                    if(Integer.valueOf(accListRec.Account_List_Item_Count__c) < count){
                        accListToDelete.add(accListRec);
                    }else{
                        System.debug('-----Cannot delete Account List record as it has Account List Item records-----');
                    }
            }
        delete accListToDelete;
    }//end of 2nd block
}
 
Thank you.
Marion
Hi, can somebody find the below error.
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Mailing POSTAL CODE should be same as account shipping POSTAL code: []
Hi,

Is there anyway to remove the setup tab, so that standard users can not access this?
I have set up permissions to limit there access to folders, but they can still click on manage users and see other peoples profiles, which i don't want them to have access to.

User-added image
Hi,

I have some records with checkbox for each record. When I checked any checkbox then I need to add new row to another table. In the new row I also need some input boxes with some actions. After that I need to save all these records.

My Visualforce page is :
 
<apex:page standardController="Line_Item__c" extensions="LineItemPackagesExtensions" recordSetVar="lineitems" >
	<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"/>
	<script type="text/javascript">
		function addPackage(pkgid){
			Visualforce.remoting.Manager.invokeAction(
		                '{!$RemoteAction.LineItemPackagesExtensions.getPackage}',
                		pkgid,
		                function(result, event){
                			$('#OpporPackages tr:last').after('<tr class="child"><td>Remove</td><td>Add</td><td>'+result.Name+'<\/td><td>'+result.Product_Category__c+'<\/td><td>'+result.Cost__c+'<\/td><td><apex:inputText value="{!result.Cost__c}"/><\/td><td>'+result.Name+'<\/td></tr>');
                    			alert(result.Name)
		                },
		                {escape: true}
            		);
		}
	</script>
	<apex:form >
        	<apex:pageBlock title="Selected Packages">
            		<apex:pageBlockButtons location="top">
				<apex:commandButton value="Save" action="{!save}"/>
                		<apex:commandButton value="Cancel" action="{!cancel}"/>
            		</apex:pageBlockButtons>
            		<table class="list" id="OpporPackages">
                		<thead>
                    			<tr>
                	       			<th></th>
		                        	<th></th>
                        			<th>Product Name</th>
		                        	<th>Product Category</th>
                		        	<th>Price</th>
		                        	<th>Final Price</th>
                		        	<th>No of Days</th>
		                        	<th>No of People</th>
		                        	<th>No of Male</th>
		                        	<th>No of Female</th>
		                        	<th>Total Price</th>
		                        	<th>Comments</th>
					</tr> 
	                	</thead>
        	        	<tbody>
                	    		<tr></tr>
		                </tbody>
        		</table>
        	</apex:pageBlock>
		<apex:pageBlock title="Search for Packages">
			<apex:outputPanel id="packagesList">
				<apex:pageBlockTable value="{!Packages}" var="a">
					<apex:column >
						<apex:actionsupport event="onclick" />
						<apex:inputCheckbox value="{!a.id}" onclick="addPackage('{!a.id}')"/>
					</apex:column>
					<apex:column value="{!a.Name}"/>
					<apex:column value="{!a.Product_Category__c}"/>
                    			<apex:column value="{!a.Cost__c}"/>
                    			<apex:column value="{!a.Stay__c}"/>
                    			<apex:column value="{!a.Activity__c}"/>
                    			<apex:column value="{!a.Description__c}"/>
                		</apex:pageBlockTable>
           		</apex:outputPanel>
        	</apex:pageBlock>
    	</apex:form>
</apex:page>

Apex Class is:
global with sharing class LineItemPackagesExtensions {

    public Package__c pkgs;
    public List<Package__c> Packages { get; set; }
    public static Package__c packageDetail{ get; set; }
    public String params{get;set;}
    public Package__c prdcat{get;set;}
    
   
    public LineItemPackagesExtensions(ApexPages.StandardSetController controller) {
        prdcat = new Package__c();
        Packages = [SELECT Name,Product_Category__c,Cost__c,Stay__c,Activity__c,Description__c FROM Package__c ];
    }

    @RemoteAction
    global static Package__c getPackage(String pkgid){
        packageDetail = [SELECT Name,Product_Category__c,Cost__c,Stay__c,Activity__c,Description__c FROM Package__c 
            where id=:pkgid ];
        return packageDetail;
    }
    
    public  List<Package__c> getPackages(){
        Packages = [SELECT Name,Product_Category__c,Cost__c,Stay__c,Activity__c,Description__c FROM Package__c ];
        return Packages;
    }
}
I don't know how to add text box in javascript code in visualforce page. Please help to achieve this.

Thanks,
Rohitash
I am planning to take the 201, 211 and 401 certifications - does anyone know do the Trailhead modules align to these and if so which modules do you need to do for each certification?

Thanks all
Jim
Hi,

I have written a vf page with controller Example1 to  get sum  of input field A, B in the  third field C. however I  am  getting error while click  on save. code  is mentioned  below, please help.



<apex:page controller="Example1" >
  <apex:form >
 
  <div>
  
  <apex:commandButton value="Save" action="{!soo}"/>
Name:<input type="Text"/><br/>
<br/>
<br/>
A's Count = <input type="Integer"/><br/>
<br/>
<br/>
B's Count = <input type="Integer"/><br/>
<br/>
<br/>

C's Count = <Output type="Integer"/><br/>
<br/>


 </div>
 
  </apex:form>
  
</apex:page>



public class Example1 {
 public integer A{get;set;}
 public integer B{get;set;}
 public integer C{get;set;}
 
 public integer soo(){
 C= A+B;
 return C;
 
 }
 
}

My email handler works fine for if condition.. but not for else... 
following is my code..:-

 

global class emailhandler2 implements Messaging.InboundEmailHandler {


  global Messaging.InboundEmailResult handleInboundEmail(messaging.inboundemail email, messaging.inboundenvelope envelope)
  {
  
  WeatherCheckIn__c[] newWeathercheckIn = new WeatherCheckIn__c[0];
  
    String subject = email.subject;
   
   String[] emailsub = email.subject.split('#', 0);
   String country = emailsub[0];
   String city = emailsub[1];
   string[] emailaddressr = envelope.fromaddress.split('@',0);
   string lastnamer = emailaddressr[0];
 system.debug('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'+lastnamer);
     Xmlparsercls obj = new Xmlparsercls(city, country);
     list<string> ls = obj.Parsexmlfile();
     
     list<contact> dulast =[select id, lastname from contact where lastname= :lastnamer];
     
     for(contact x : dulast){
     
        if(x.lastname != lastnamer) {
     
     system.debug('//////////////////////////////////////////x.lastname!=lastnamer//////////'+x.lastname);
      
   
   Contact c = new Contact();
   
      c.LastName = lastnamer;
      
      insert c;
       WeatherCheckIn__c wcic = new WeatherCheckIn__c();
        wcic.City__c = city;
        wcic.Country__c = country;
        wcic.Contact__c = c.id;
      newWeathercheckIn.add(new WeatherCheckIn__c(City__c = city,
      Country__c = country));
      insert wcic;
       WeatherCheckOut__c wechou= new WeatherCheckOut__c();
   
   wechou.Location__c = ls[0].substring(24,75);
   wechou.Temperature__c = ls[0].substring(88,100);
   wechou.DewPoint__c = ls[0].substring(110,120);
   wechou.Contact__c = c.id;
   insert wechou;
   
   }
    
     
     else{
  
   system.debug('############################################# x.lastname==lastnamer ####'+x.lastname);
   
  
 WeatherCheckIn__c wcic = new WeatherCheckIn__c();
        wcic.City__c = city;
        wcic.Country__c = country;
        wcic.Contact__c = x.id;
      newWeathercheckIn.add(new WeatherCheckIn__c(City__c = city,
      Country__c = country));
      insert wcic;
       WeatherCheckOut__c wechou= new WeatherCheckOut__c();
   
   wechou.Location__c = ls[0].substring(24,75);
   wechou.Temperature__c = ls[0].substring(88,100);
   wechou.DewPoint__c = ls[0].substring(110,120);
   wechou.Contact__c = x.id;
   insert wechou;
   
   update x;
   }
        }
     system.debug('----------------------------------------subject--------------------'+subject);
       system.debug('--------------------------------------------------country--'+country);
       system.debug('--------------------------------------------city---------'+city);
  
      
       system.debug('............................................................................................................'+ls[0].substring(24,75)+ls[0].substring(88,100)+ls[0].substring(110,120));
      
    Messaging.InboundEmailresult result = new Messaging.InboundEmailResult();
    result.message = 'Your mail has been recieved'+ls;
  
    return result;
  }
}

Unable to retrieve information from the email sent to salesforce.

I am probably trying to check information through debug logs.. 

help ASAP!!

global class processApplicant implements 
        Messaging.InboundEmailHandler {
       
 global Messaging.InboundEmailResult handleInboundEmail(
  Messaging.InboundEmail email, 
  Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = 
        new Messaging.InboundEmailresult();
        
        system.debug('---------------------------------------------------------------result1------'+result);
        // Captures the sender's email address
String emailAddress = envelope.fromAddress;
        system.debug('-----------------------------------------------------------------emailaddress----'+emailaddress); 
  // Retrieves the sender's first and last names
String fName = email.fromname.substring(
        0,email.fromname.indexOf(' '));
String lName = email.subject;
         system.debug('--------------------------------------------------------------fname-------'+fname);
                 system.debug('--------------------------------------------------------lname-------------'+lname);
  // Retrieves content from 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 phoneNumber = emailBody[0].substring(6);
String city = emailBody[1].substring(5);
        
        system.debug('---------------------------------------------------------------------'+result);
return result;
    }   
}

public class DispatcherContactNewController {

    public DispatcherContactNewController(ApexPages.StandardController controller) {
        this.controller = controller;
    }
   
    public PageReference Redir() {
PageReference newPage;
    PageReference standardpage = New PageReference('/00Q/e?retURL=%2F00Q%2Fo&RecordType=012900000011wvV&ent=Lead&nooverride=1');
        RecordType r;
        r = [Select id,developerName from RecordType Where SobjectType='Lead' And id = :ApexPages.currentPage().getParameters().get('RecordType')];
        
        if ( r.developerName == 'LeadVisualforcePage') {
        
        System.debug('----------------------------------------------------------------------');
        
            newPage = Page.leadtask;
            newPage.setRedirect(true);
            return newPage;
        } else {
        
         System.debug('**********************************************************************');
         
         return standardpage;
        }

    }

    private final ApexPages.StandardController controller;
}
Code:-

location.replace('/email/author/emailauthor.jsp?retURL=/{!Lead.Id}&p3_lkid={!Lead.Email}&rtype=00Q&p2_lkid={!Lead.Id}&template_id=00XA0000000RfyB&p5=&save=1');

Error:-

The value of the "p3_lkid" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information. 
I am planning to take the 201, 211 and 401 certifications - does anyone know do the Trailhead modules align to these and if so which modules do you need to do for each certification?

Thanks all
Jim
Hello SalesForce Developers! :)
I'm looking for SalesForce Developer - this is the best offer in Europe! :) My client from Warsaw needs people with experience, and I think this is good proposal for you.
This is fully remote job, so you can work at home! What do you think about it? :)
 
Regards,
Please contact me on: karolina.grunwald@seargin.com