Outlook Integration with Salesforce (Ability to associate attachment into related record and Ability to Edit the Email Messages)
This blog series will help you to understand and configure the Outlook to salesforce and associate the email message attachment into a related record along with editing privileges on the email message after inserting it into salesforce.
Outlook integration:
Many of us are struggling to integrate the outlook into salesforce, but this blog will help you to implement the same step by step along with a screenshot.
Email Message Attachment Associate into Related Record:
In Salesforce email message attachment will be saved under the same email message, it’s very hard to view & navigate from related records, but this blog will help you to associate the email message attachment into a related record. Users can see the attachment on the related record itself, no need to navigate into the email message to view the attachments.
Ability to edit the Email Message
The general behaviour of the email message in salesforce is that we can't edit
the email message after it’s associated with salesforce, but this blog will help you edit the email message at any time.
Configuring the Outlook Setting in salesforce :
Step 1: Login Salesforce Dev/Sandbox/production org.
Step 2: After login into the salesforce, click on the setup → Quick Find → Outlook Integration And Sync And Enable the Outlook Integration and Lightning Sync as shown below.
Step 3: Expand Outlook Integration and In Email Application Publisher
Layouts Click the new button to create a new layout.
Step 4: Click on the edit button to edit the existing layout.
Step 5: Add or Remove quick action to the layout in order to access the outlook Panel, example contact, task, lead, Account in Outlook etc…
Integration & Adding salesforce Plugin into outlook
Step 1: Log in to the Outlook Office365 Account(Enter the Username and Password)
Step 2: Select the Outlook
Step 3: Click the App Launcher Icon:
Step 3: Click on the “All apps” link to view the existing plug-ins as shown below.
Step 4: Click on the “Add-Ins” option to add the salesforce plug in.
Step 5: Search “Salesforce ” on the Search bar.
Step 6: Select Salesforce from the Drop Drown menu:
Step 7: Click to “Get it Now” to install the plug in outlook.
Step 8: Click “Continue” from the popup window as shown below.
Step 9: The following screen will apply and Click Open in Outlook Web
Step 10: Open the email and click “More Action” then Scroll down for more action and click Salesforce icon.
Step 11: Select “Salesforce” Then Click to “log in to salesforce” and then Enter the username and password
Step 12: Click to “Allow”
Step 13: It will redirect into a salesforce account then enter the Username and Password.
Step 14: Click on the confirm button to connect the outlook into salesforce.
Step 15: Now successfully logged your developer account from outlook.
Step 16: Make sure you enabled Enhanced Email->Enabled>Attachment Goes to Email Message(Object)
Step 17: Enhanced Email->Disabled>Attachment goes to Contact ->Activity->Task.
Step 18: If no contact is found in salesforce, Click the "Add to Salesforce" link to create a record in salesforce or use the Create button to create a record.
Step 19: Click + Create icon to create a new task, Event, Contact, Account, etc.......
Step 20: if not display the object here we need to create quick action in global action and add publisher layout.
Step 21:then we need to add quick action object into Email application publisher layout so that we can able to see the object into outlook
Step 22: Click to log Email along with Attachment checkbox tick and click Save.
Step 23: Attachment added into salesforce
Step 24: Click “Show this is record sale in salesforce" button.
Step 25: It will Create one task added attachment show in below
Step 26: Click Account name “outlook 2” it will Redirect into account page layout shows the attachment showing in files.
Step 27: Click edit button to modify email message it will redirect in custom Visualforce page
Step 29: we need to override the standard Email Message “edit” button so that we can
redirect.
Step 28:it will vf page and Modify the date and text body and subject then click save.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************ | |
Trigger Name : UpdateStatus | |
Description : To update the draft status of email message | |
Created by : Sampath Arjunan | |
Created Date : 9th April 2020 | |
Last Modified Date : 9th April 2020 | |
*************************************************/ | |
trigger UpdateStatus on EmailMessage (before insert) { | |
for(EmailMessage newMessage:trigger.new){ | |
newMessage.status='5'; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardController="EmailMessage" lightningStylesheets="true"> | |
<apex:form > | |
<apex:pageblock > | |
<apex:pageblockSection > | |
<apex:inputfield value="{!Emailmessage.messageDate}"/> | |
<apex:inputfield value="{!Emailmessage.Subject}"/> | |
<apex:inputfield value="{!Emailmessage.Textbody}"/> | |
</apex:pageblockSection> | |
<apex:pageblockButtons > | |
<apex:commandButton value="Save" action="{!save}"/> | |
</apex:pageblockButtons> | |
</apex:pageblock> | |
</apex:form> | |
</apex:page> |