Tuesday, 16 May 2017

Salesforce Apex Hours:- HyperBatch



Farmington Hill Salesforce Developer group / Salesforce Apex Hours organized another successful Online session/event on Saturday, MAY 13, 2017 , focusing on "Hyper Batch".

First of All I would like to thank to "Daniel Peter" for great session and demo on "Hyper Batch". And Thank you much to all Farmington Hill Salesforce Developer Group Member for joining us online. This time more then 120+ person  joined us.
 


Agenda :-  
• Whats is HyperBatch
• Difference between Old Traditional Apex Batch job and HyperBatch
• Demo
• FAQ 


Speaker :- Daniel Peter (Salesforce MVP)
Date :-
Saturday, MAY 13, 2017 11:00 AM EST
Venue/Link :- Online



PPT:- 


https://www.slideshare.net/AmitChaudhary112/salesforce-apex-hours-hyper-batch




Session Recording :- https://www.youtube.com/watch?v=hja4o-Oa4zo&feature=youtu.be




Please follow us on below pages/link for future session :-

Thanks,
Amit Chaudhary
@amit_sfdc



Tuesday, 9 May 2017

VLOOKUP Example | VLOOKUP Function in Salesforce | Validation Rule with Vlookup in Salesforce

In this example we will checks that a billing postal code is valid by looking up the value in a custom object called ZipCode__c that contains a record for every valid zip code. If the zip code is not found in the ZipCode__c object or the billing state does not match the corresponding State__c in the ZipCode__c object, an error will display.


Syntax :- 

VLOOKUP(field_to_return, field_on_lookup_object, lookup_value)

field_to_return :- the field that contains the value you want returned
field_on_lookup_object :- the field on the related object that contains the value you want to match
lookup_value :- with the value you want to match


VLOOKUP Example in Salesforce Step by Step process


Step 1) Create one custom object ZIPCODE


Step 2) Upload some Test data.



Step 3) Create Validation Rule



Vlookup(
       $ObjectType.ZipCode__c.Fields.State__c ,
       $ObjectType.ZipCode__c.Fields.Name ,
       BillingPostalCode
) != BillingState



Please check below post for more detail
1) https://help.salesforce.com/articleView?id=customize_functions_i_z.htm&type=0&language=en_US


Thanks
Amit Chaudhary

Monday, 8 May 2017

Success Story of :- Adam Olshansky


Welcome to my 10th Salesforce Success Story series. This series is focused on success story and to inspire/encourage new user/Developer. And why we should join our local Salesforce Developer/User group.


1) Your Job Title
[ADAM ] :- Salesforce Developer

2) Your success Story
[ADAM ] :- I started off as an analyst for SAP Infrastructure and lucked into using Salesforce after a promotion. Having come from a Java background in college, I found the platform both easy to pick up and extremely user friendly compared to SAP. I also loved being able to focus on building and creating apps and not having to worry about the behind the scenes hardware. I attended my first Dreamforce and fell in love with the platform after attending a couple of hands-on trainings and experiencing the feeling of given back! I was also inspired to start getting Salesforce Certified to motivate myself to learn and prove myself on the platform to companies. After receiving 5 certs in 6 weeks, I set on the Advanced Developer path and after landing my first Salesforce developer job and achieving that cert, I started down the Architect path! Today I have 13 Salesforce certifications, am a Salesforce MVP, am a full-time Salesforce developer, and looking to give back to the community any way that I can. More info here:  https://www.adminhero.com/origins-the-story-of-adam-olshansky/ and https://www.salesforce.com/blog/2017/02/12-salesforce-certifications-relaunch-career.html

3) Why we Should Join a Salesforce User/Developer Group
[ADAM ] :- It's a great opportunity to network with other people passionate about the platform as well as learn how to use the platform in a new way!

4) Advice for new Salesforce Developer
[ADAM ] :- Don't be intimidated! There are a tremendous amount of people in the community who want to help you! There are also a great number of resources out there to help you grow your career.

5) Trailhead badges
[ADAM ] :- I have 200+ but my favorites are:

Follow Adam Olshansky on:
Twitter:-
@adam17amo


If you want to share your Salesforce Success Story, Please feel free to drop me an email :- amit.salesforce21@gmail.com 


<<PREVIOUS       NEXT>>


Thanks
Amit Chaudhary
@amit_sfdc

Monday, 1 May 2017

How to create Visualforce Email Templates (Step by Step)

Visualforce Email Templates

We can also use Visualforce to create email templates. The advantage of using Visualforce over standard HTML email templates is that Visualforce offers you the power to perform advanced operations on data that's sent to a recipient

  • Visualforce email template should be within a single <messaging:emailTemplate> tag.
  • The <messaging:emailTemplate> tag should contain either a single <messaging:htmlEmailBody> or <messaging:plainTextEmailBody> tag.
  • Some standard Visualforce components are not available for use within <messaging:emailTemplate>. For Example <apex:detail>, <apex:pageBlock> and all related pageBlock components, and all input components such as <apex:form>.
  • All <apex:component> tags used within a Visualforce email template should have an access level of global.
  • The max size of a Visualforce email template is 1MB.
  • You can’t send a mass email using a Visualforce email template.

NOTE:-

1) The <messaging:htmlEmailBody> component can include a mix of Visualforce markup and HTML.
2)The <messaging:plainTextEmailBody> component can only include Visualforce markup and plain text

Step by Step process:-

Step 1:-  Click on Email Template from start menu.



Step 2 :-  Then click on new "New Template" button and select "VisualForce" radio button


Step 3 :- Then Enter all below detail for email template


Step 4 :-  Then click on your "Edit Template" button to edit VF page.



Visual force Email Template code :- 
<messaging:emailTemplate 
subject="Case report for Account: {!relatedTo.name}" 
recipientType="Contact" 
relatedToType="Account">

    <messaging:htmlEmailBody >
        <html>
        <body>
            <p>Dear {!recipient.name},</p>
            <table border="0" >
                <tr>
                    <th>Case Number</th><th>Origin</th>
                    <th>Creator Email</th><th>Status</th>
                </tr>
                <apex:repeat var="cx" value="{!relatedTo.Cases}">
                <tr>
                    <td><a href = 
                        "https://na1.salesforce.com/{!cx.id}">{!cx.CaseNumber}
                    </a></td>
                    <td>{!cx.Contact.email}</td>
                </tr>
                </apex:repeat> 
            </table>
        </body>
        </html>
    </messaging:htmlEmailBody>

</messaging:emailTemplate>

NOTE:- 
In Above example First we created the top level element <messaging:emailTemplate>. Using attributes we declare two different VF standardControllers used by this email template. First, the recipientType also called the WhoID and 2nd the relatedToType also refered to as the whatID in regular email template. We can also set a replyTo address, so that anyone replying to the email can reply back to this address


Using Custom Controllers within Visualforce Email Templates


Visualforce email templates can leverage custom controllers to render highly customized content. To do so, include a custom component in a Visualforce email template that uses that custom controller



<messaging:emailTemplate subject="Apex Code" recipientType="Contact" relatedToType="Opportunity">
 <messaging:htmlEmailBody>
  <c:cutomComponentName/>
 </messaging:htmlEmailBody>
</messaging:emailTemplate>

NOTE:- Sharing settings are applied if your email templates use a standard controller. If your organization-wide default (OWD) for the user object is Private and you need to access user information in your Visualforce email template, you can use a custom component or custom controller with the without sharing keywords

Thanks,
Amit Chaudhary