Thursday 31 December 2015

APEX- Collections

Collections:   


Collections somewhat works like arrays, except their size can change dynamically. In other way, you can say that it is much more advanced than arrays.
In simple words, these are type of variables which can store multiple number of records.
We often use collections because they go hand-in-hand with SOQL.

Apex has the following types of collections:
  • List
  • Set
  • Map

List:
  • List is an ordered collection of elements
  • It will allow duplicates.
  • These are zero-based so the first element in the List is always 0.   
  • Datatype allows both Primitive datatype and non-primitive datatypes.
  • Size of the List increased dynamically.
     Syntax:  Basic Syntax of List are:
                       List <datatype> list_name = new List<datatype>();
                       List <datatype> list_name = new List<datatype>{value [, value2. . .]};
                        


Set:
  • Set is an unordered collection of elements.
  • It will not allow duplicates.
  • It is typically used to store collection IDs that you want to use in SOQL query.
  • Datatype allows only Primitive datatype and sObjects.
Syntax:  Basic Syntax of Set are:
                    Set<datatype> set_name = new Set<datatype>(); 
                    Set<datatype> set_name = new Set<datatype>{value [, value2. . .] }; 
  

Map:
  • Map is a collection of Key –values pairs.
  • Key must be unique but values are duplicates.
  • Use a map when you quickly find something by a key.
  • Keys allows only Primitive datatypes and are unique only.
  • Values allows both Primitive and Non-Primitive datatypes.
    Syntax:  Basic syntax for Map are:

               Map<key_datatype, value_datatype> map_name = new map<key_datatype, value_datatype>();

               Map<key_datatype, value_datatype> map_name = new map<key_datatype, value_datatype>{key1_value =>  value1_value [, key2_value =>  value2_value. . .]};



Hope this helps you. 

Thursday 10 December 2015

Learning Apex for Beginners

Apex-Overview
  • Apex is a language developed by Salesforce.com.        
  • Apex has a Java-like syntax and acts like database stored procedures.
  • Apex is a strongly typed, object-oriented programming language that allows developers to execute the flow and control statements on the Force.com platform server in conjunction with calls to the Force.com API.  
  • Apex enables the developers to add business logic to most system events, including button clicks, related record updates, and Visualforce pages.
  • Apex code can be initiated by Web service requests and from triggers on objects.
  • Apex is included in Performance Edition, Unlimited Edition, Enterprise Edition, and Developer Edition.
  • Apex provides built-in support for unit test creation and execution, including test results that indicate how much code is covered, and which parts of your code could be more efficient.

When developers choose Apex?

Developers choose apex when they are not able to implement the complex business functionality using the pre-built and existing out of the box functionalities. 

Working Structure of Apex

As shown in the below diagram, Apex runs entirely on demand Force.com platform:





Understanding the Apex syntax
Apex code typically contains many things that you might be familiar with from other programming languages.
Programming elements in Apex:



Environment for our Salesforce Apex development
You can develop the Apex code in either Sandbox or Developer edition of Salesforce. A Sandbox organization is a copy of your organization in which you could write code and test it without taking the risk of data modification or disturbing the normal functionality. After that you have to develop the code in Sandbox and then deploy it to the Production environment.


Hope this helps.




Tuesday 17 November 2015

Cleared #Salesforce Platform App Builder- Sharing Experience

Hi everyone. I have cleared the Platform App Builder transition exam and want to share my experience with you all.

If you are preparing for Platform App Builder exam and you have experience in Salesforce configurations then I think  2 weeks are enough to prepare for this certification exam. I have DEV401, so for me its 30 minutes exam, having 20 questions. For those who don't have DEV401, they have 90 minutes exam, having 60 questions. You can get all the details from App Builder Study Guide provided by Salesforce.

Before going for the Platform App Builder certification exam, you must know about the following topics:
  1. Lightning App Builder and its components.
  2. Relationships and their properties.
  3. Order of execution.
  4. Types of Sandboxes.
  5. Managed vs Unmanaged Packages
  6. Overview of Salesforce Automation.
  7. Record Types
  8. External Objects.
  9. App Exchange
  10. Social Accounts and Person Accounts.
Last but not the least, you must practice these things in Trailhead. Its the best way for preparation of this certification exams. While practicing in Trailhead, you get the pdf & videos related to these topics. So keep trailing.

All the best for those who are going for the certification. Keep learning Salesforce !!

Monday 12 October 2015

Build your First App using Lightning App Builder

Here is the tutorial for creating a basic app using Lightning app builder.
While Creating a Lightning App Builder following steps we have to follow:

  1. In the Setup menu, select **Build -> Lightning App Builder**
  2. Click New under Lightning Pages to start Lightning App Builder
  3. Select the template according to the requirements
  4. In the Create a New Lightning Page pop-up, set the value Label: My First App and click finish.
   
Now the page looks like:


Here you can toggle between Phone and Tablet (or Tablet Landscape) and set the template according to your requirements .Each templates behaves differently when preview mode changes.



The canvas is an area where you can build your Lightning page.You can add components by dragging components from the left sidebar.You can add standard as well as custom components.



Properties for the currently selected item. This can either be for the page itself, in which case the title will indicate Page. Otherwise you can set properties for individual components. In this instance the title will indicate Page > [SelectedComponent].
You can also select the Actions (only Global publisher actions are allowed) for this page. 



You can add Rich Text also in Lightning Page in which you can set the size, font or you can bold , italic, etc the words also and add it in the canvas area.



And finally you can Save and Activate this page. Save the current definition of your app. Activate adds your app the the Salesforce1 Mobile navigation. Back To Setup exits Lightning App Builder and returns you to the list of Lightning Apps. Help launches the online help for Lightning App Builder.


Hope it helped.

Thanks

Friday 9 October 2015

Basics of Lightning App Builder

Now anyone can build app faster using Lightning. I am a big fan of lightning components, they make life easy for the admins. I learned allot using trailhead, so sharing it.


                                 
Lightning Pages are the underlying technology for the Lightning App Builder. It is a custom layout that lets you design specific pages in Salesforce1. It is composed of regions that contain components.
You can choose the templates while creating the page , which also controls the lightning page on a given devices.



The Lightning App Builder User Interface

The Lightning App Builder's User interface makes creating app pages for Salesforce1 easy.Here's the parts of the tool:




Header (1)
The header shows you the label of your Lightning Page. It also gives you the opportunity to return to Setup without saving or to view additional help for the Lightning App Builder.

Toolbar (2)
Use the buttons in the toolbar to cut, copy, and paste page content; and to undo , redo , save, or activate your Lightning Page. You can also view your page in different formats and adjust the canvas size to fit your view.

Lightning Components Pane (3)
The components pane contains all standard and custom Lightning components that are supported for your Lightning Page. Click and drag a component to add it to the page.

Lightning Page Canvas (4)
The canvas area is where you build your page. You can drag components to reorder them on the page. If a component has missing or invalid properties, you see an invalid component indicator.

Properties Pane (5)
Depending on what you select on the page, the properties pane shows either the overall page properties or the properties of the component that you’ve selected. 

 thanks, hope it helps!!                                                                            

Thursday 23 July 2015

Cleared Salesforce Developer Certification DEV401 - Sharing Experience

Hi everyone, this is my first blog on Salesforce, I just love Salesforce, just now cleared DEV401 certification, this is my first certification so felt like to share my sharing my experience.



I have been preparing for it since last 2 months, when I was looking for salesforce study guide or something to study and learn about salesforce, so I got the Salesforce Recruiter App , it is one of the important study material anyone shoud go through before appearing in the certification.
I got hands-on in Salesforce from the recruiter app only, it have great explanation about most of the basic thing of salesforce like Objects ( Standard and Custom), Workflow, Validation rule, Approval Process, Roles, Profiles and Reports and Dashboards etc.

Few things I didn't get in the book was about the "Encrypted field" of Salesforce and I got few question in the exam about this field, so please look into this field how it works and permissions to access the encrypted field.

Few months ago recruitment app was the only rigid material that anybody would recommend for the developer certification, but I will recomment you all a latest thing for the salesforce learner and that is #trailhead

 Yes  #trailhead, trailhead is right now the only place where you will love learning the Salesforce, it is so amazing that you can't stop yourself for trailing.
When I started on the trailhead right on the same day I ended up having 3-4 badges. Now I have more than 60 badges :)

And now you know how many badges I have, take a look



So please start trailing asap, few thing I did before going for the certification was
  • Look into the Study guide of DEV401 ceritifcation provided by the salesforce
  • Understanding the data model of salesforce
  • Few feature of the salesforce like workflow and approval process.
  • Relationships is also one of the important thing need to cover which you will get in recruiter app.
  • Deep dive in Validaton rules and type of fields, roles and profile ( permissions )


All the best for those who are going for the certification, start feeling lucky because you have trailhead now.
Hope I have motivated someone, keep learning Salesforce !!