Saturday, December 17, 2016

Send an Email Reminder for an Events or Tasks using Process Builder

Reminders for Activities, will only pop-up when you are logged into your browser. Not every user might be logged in every day, in which case you might want to set up email reminders to be send to a user for Tasks or Events.

We can send email reminder by creating Workflow Rule or Process Builder. In this post, I would like cover Process Builder. Because, we can not create Workflow Rule in Professional Edition as it is a limitation. However, In Professional Edition Salesforce provided another option called "Process Builder" which is more efficient than "Workflow Rule".

Please follow below steps to achieve the requirement.

We should have "Email Template" and "Email Alert" ready before creating Process Builder.

Email Template:

1. Your Name | Communication Templates | Email Templates and click on "New Template" button.

2. Select type of Email Template and click on Next button.

3. Enter properties of the Email Template as shown below. Please make sure "Available For Use" field is checked and click on Save button. After save, click on "Edit Template" button.

4. Enter body of the Email Template as shown in below screen shot and click on Save button.


Code Snippet:
<messaging:emailTemplate subject="Salesforce Event Reminder !" recipientType="User" relatedToType="Event">
<messaging:HTMLEmailBody >

Hi {!relatedTo.Owner.Name}, <br/><br/>

Gentle reminder ! <br/><br/>

You have scheduled event and below are the event details. <br/><br/>

Name: {!relatedTo.Subject} <br/>
Start Date/Time: <apex:outputLabel value="Start Date/Time: " for="sDateTime"/><apex:outputField value="{!RelatedTo.StartDateTime}" id="sDateTime"/> <br/>
End Date/Time: <apex:outputLabel value="Start Date/Time: " for="eDateTime"/><apex:outputField value="{!RelatedTo.EndDateTime}" id="eDateTime"/> <br/><br/>

Thank you, <br/>
Salesforce.com

</messaging:HTMLEmailBody >
</messaging:emailTemplate>

5. Yes, We have completed our Email Template and below is the preview of Email Template.
Note: Merge fields are not available in preview of visualforce email template.

Email Alert:

1. Your Name | Setup | Create | Workflow & Approvals | Email Alert and click on "New Email Alert" button.
2. Fill all the fields as shown below screen shot and click on Save button.
3. Below is preview of Email Alert.


Process Builder:

1. Your Name | Setup | Create | Workflow & Approvals | Process Builder  and click on New button from top right corner as shown below.

2. Enter name in Process Name then API Name field would populate automatically, enter description optionally and hit the Save button.

3. Click on "Add Object" option, enter Event(i.e. name of the object) and select the criteria as shown below screen shot.
4. Click on Criteria, enter name and rule of the criteria, other options as shown below.
5. Scroll down and check "Advanced" section check box as well and hit the Save button.
6. Click on "Set Schedule" option, set time for reminder and hit the save button.
7. Click on "Add Action", select "Email Alerts" from Action Type, enter Action Name and start enter name of the email alert so that template would be populate and select it. Finally, click on Save button.

That's all. Now onwards, whenever an event has scheduled then email reminder notification will be sent to owner of event before 1 hours event occurs.

                                                Thank you for referring the post

Wednesday, December 14, 2016

How do I receive an email notification for a scheduled event?

1. We can send email notification to attendees(contacts or leads) and Owner for Event using salesforce standard functionality by following below steps.

a) Click on "New Event" button and fill all mandatory fields.
b) At this stage, on the screen we can not see the "Save & Send Update" button.

c) In order to see the "Save & Send Update" button we should select contact or lead record in "Name" field and click on "Add to Invitees" link beside to "Name" field lookup icon. If you click on "Add to Invitees" link without select contact or lead then you can not see the "Save & Send Update" button.


d) If you click on "Save & Send Update" button then email notification will go for attendees(contacts or leads) and Owner of Event. If you click on "Save" button then email notification will not go for attendees(contacts or leads) and Owner of Event.

We can not send reminder(like 1/2 hours or 1 Day before event occurs) email notification with  salesforce standard functionality. In order to achieve this functionality we should write time dependent Workflow Rule Email Alert.

Note: If "Allow Users to Relate Multiple Contacts to Tasks and Events" is enabled in your organization then you can add multiple contacts to tasks and events by using lookup icon.

Navigation to enable above permission:
Your Name | Setup | Customize | Activites | Activity Settings
                                           (OR)
Setup | Customize | Activites | Activity Settings
                                   
                                                Thank you for referring the post

Thursday, November 3, 2016

Ways to identify type of edition of your salesforce org?

We can identify which type of edition we are using in multiple ways as shown below.

1. Click on Administer or any link under Administer from sidebar setup page then you can see the name of the edition.
2. Navigation: Setup ---> Administer ---> Company Profile ---> Company Information.

3. On different browsers:
a). Google Chrome, Internet Explorer, Mozilla Firefox: Hover the mouse over the tab where salesforce org is opened as shown below.

4. Using below SOQL from Query Editor in Developer Console or in Apex code.
SOQL Query: SELECT Organizationtype FROM organization

We can find different type of editions using Schema object from "Execute Anonymous Window" in Developer Console or in Apex code.

Code snippet:

Schema.DescribeFieldResult dfr =Schema.sObjectType.Organization.fields.OrganizationType;
List<String> values = new List<String>();
for(Schema.PicklistEntry ple : dfr.getPicklistValues()){
    values.add(ple.getValue());
}
system.debug(JSON.serialize(values));
Where Team Edition and Base Edition are called as Group Edition and Performance Edition respectively.


--- Thank you for referring the post ---

Wednesday, November 2, 2016

How to "Skip Record Type Selection Page" on overridden "New" button of object

If an object(Standard/Custom) have multiple record types and "New" button has overridden by Visualforce Page then we can
1. Check "Skip Record Type Selection Page" checkbox if you do not want to redirect user to record type selection page.
2. Uncheck "Skip Record Type Selection Page" checkbox if you want to redirect user to record type selection page.

For Standard object navigation: Setup ----> Build  ---> Customize ---> Object name ---> Buttons, Links and Actions ---> Click Edit link next to "New".

For Custom object navigation: Setup ----> Build  ---> Create ---> Objects ---> Object name ---> Buttons, Links and Actions ---> Click Edit link next to "New".


  • We can not in-active the record type if it is default record type for any profile.
  • We can not delete the record type if it is active.
  • We can not select "Master" record type if any other record type(s) already selected.
--- Thank you for referring the post ---

Tuesday, November 1, 2016

How to Remove "Record Type" from Chatter Profiles?

If a custom object have one or more record types and associated to chatter profiles. Now, if you want to remove record type(s) from chatter profile then you can not remove as can remove from other profiles. So, we can achieve this by doing URL hacking as shown below.

https://xxx.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id={Profile ID}&tid={Custom Object ID}&pn={Profile Name}


xxx : Server name[Exp: ap1,na2,cs3,etc...] or Domain name.

{Profile ID} : ID of profile from which you want to remove record type.
{Custom Object ID} : ID of object of record type.
{Profile Name} : Name of profile from which you want to remove record type.


--- Thank you for referring the post ---