Posts

Showing posts from August, 2018

Annotations in Apex in Salesforce.com

Annotations in Apex in Salesforce.com An Apex annotation modifies the way a method or class is used, similar to annotations in Java. Annotations are defined with an initial @ symbol, followed by the appropriate keyword. To add an annotation to a method, specify it immediately before the method or class definition. Apex supports the following annotations: 1. @Deprecated 2. @Future 3. @IsTest 4. @ReadOnly 5. @RemoteAction 6. @TestVisible Apex REST annotations: 1. @RestResource(urlMapping='/yourUrl') 2. @HttpDelete 3. @HttpGet 4. @HttpPatch 5. @HttpPost 6. @HttpPut @future annotation in Salesforce:    Use the future annotation to identify methods that are executed asynchronously. When you specify future, the method executes when Salesforce has available resources.    For example, you can use the future annotation when making an asynchronous Web service callout to an external service. Without the annotation, the We...

System assertEquals Salesforce

System assertEquals Salesforce, Here I am posting about assert methods in System class. This helps everyone to find the differences between assert methods in salesforce. Below are the three assert methods in system class. 1. System.assert(condition, msg) 2. System.assertEquals(expected, actual, msg) 3. System.assertNotEquals(expected, actual, msg) What is System.assert(condition, msg)? This method asserts that the specified condition is true. If it is not true, a fatal error is returned that causes code execution to halt. Signature of this method: Public static void assert(Boolean condition, Object msg) This method is having two parameters, one is  condition  which is Boolean type, the other one is  msg  which is optional and object type.   What is system.assertEquals(expected, actual, msg)? This asserts that the first two arguments are the same. if they are not same, a fatal error is returned that causes code execution halt. Signature of ...

Apex Developer Guide

Salesforce has changed the way organizations do business by moving enterprise applications that were traditionally client-server-based into the Lightning Platform, an on-demand, multitenant Web environment. This environment enables you to run and customize applications, such as Salesforce Automation and Service & Support, and build new custom applications based on particular business needs. Getting Started with Apex Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Lightning Platform server, in conjunction with calls to the API. Writing Apex Apex is like Java for Salesforce. It enables you to add and interact with data in the Lightning Platform persistence layer. It uses classes, data types, variables, and if-else statements. You can make it execute based on a condition, or have a block of code execute repeatedly. Running Apex You can access many features of the Salesforce user in...

How many records we can import or export using data loader and import wizard for the latest update?

Import Wizard : Is designed for less-technical users and smaller, simple imports of up to 50,000 records. Can only import data of Account, Contact, Leads, Solution, and Custom Object. For more information, go to Help & Training | Importing Data | Using the Import Wizards. Data Loader : For complex imports of any size. Can upload more than 50000 records. Can import and export data.

SFDC scenario based interview Questions

please go through this link. https://www.interviewquestionspro.com/2017/03/sfdc-scenario-based-interview-questions.html

Web to Lead and Web to Case in salesforce

I was going through visual workflow in Salesforce I found Web to Lead and the web to Case Here's link . Can anyone please explain What is Web to Lead and Web to Case in Salesforce? I got only got a very vague understanding of these cause I am new to Salesforce. What is Lead and Case here refers to? What is Use case of these two? I tried to understand Lead but it wasn't explained very clearly here's link . ? - Both Web to Lead and Web to Case generate basic HTML to pass onto your website developer that would pass queries straight into Salesforce. Web to Lead is normally Sale driven, e.g. someone interested in a product or receiving a call back from a Sales-person. Web to Case is normally Customer Service driven, e.g. My product doesn't work help me, please. Both are basic inquiry forms. You have a daily limit of how many can be created - this is to prevent spammers from taking over. A word on that, mask the org id on the web page - as this is all they need to spam usi...

Salesforce Asynchronous Apex

Asynchronous Apex Apex offers multiple ways for running your Apex code asynchronously. Choose the asynchronous Apex feature that best suits your needs. This table lists the asynchronous Apex features and when to use each. Asynchronous Apex Feature When to Use Future Methods When you have a long-running method and need to prevent delaying an Apex transaction When you make callouts to external Web services To segregate DML operations and bypass the mixed save DML error Queueable Apex To start a long-running operation and get an ID for it To pass complex types to a job To chain jobs Batch Apex For long-running jobs with large data volumes that need to be performed in batches, such as database maintenance jobs For jobs that need larger query results than regular transactions allow Scheduled Apex To schedule an Apex class to run on a specific schedule Future Methods Future Methods with Higher Limits (Pilot) Queueable Apex Take control of your...

What is Apex Sharing? How to share a records via apex?

Sharing rules, let us make automatic exceptions to organization-wide defaults for particular groups of users. Sharing rules can never be stricter than our org-wide default settings. We can extend the organization-wide default setting with sharing rules. Example – If any object is private with org-wide default then we can extend the access to public read-only or public read-write with sharing rule. Salesforce provides a way by which we can create a sharing rule by the only point and click from the salesforce standard. You can set any criteria and give access to the object’s record . Example – Suppose u need to create a sharing rule for a lead object when the lead field “Is_public” become true then you can easily add these criteria and give the public access to the particular User or group etc. But some cases are there where we can’t use the standard sharing rule functionality that’s why we need to create sharing rules with apex. Let’s take a case example ...

Salesforce Data Security Model — Explained Visually

Image
To provide a security model that satisfies numerous, unique real-world business cases, Salesforce provides a comprehensive and flexible data security model to secure data at different levels. Salesforce also provides sharing tools to open up and allow secure access to data based on business needs. In this post, I explain how security features work together by taking a real-world scenario and describing it using images and GIFs. To provide a security model that satisfies numerous, unique real-world business cases, Salesforce provides a comprehensive and flexible data security model to secure data at different levels. Salesforce also provides sharing tools to open up and allow secure access to data based on business needs. In this post, I explain how security features work together by taking a real-world scenario and describing it using images and GIFs. This post serves as a primer on the Salesforce Data Security Model. Fore more in-depth information about the Security Model, see the...

Salesforce Collections?

Collections in Apex can be lists, sets, or maps. There is no limit on the number of items a collection can hold. However, there is a general limit on heap size. Lists A list is an ordered collection of elements that are distinguished by their indices. List elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types. Sets A set is an unordered collection of elements that do not contain any duplicates. Set elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types. Maps A map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types. Parameterized Typing Apex, in general, is a statically-typed programming language, which means users must specify the data type for a variable before that variable can be used. ...