Skip to main content

Posts

Salesforce Certification Study Materials

    All Latest Salesforce Study Materials     Contact here! dr@devrajtomar.com First Name Last Name Email Company City State/Province

Important Apex Code for getting Months, Days and Years:

Important Apex Code for getting Months, Days and Years: system.now().formatGMT('MMMMMMMMMMM') :  This line will return Current Month in string up to 11 Character. Fix the number of character by changing number of 'M'. if system date is somewhere in the month of January then : string monthName = system.now().formatGMT('MMM'); //return JAN DateTime.newInstanceGMT(Date.newInstance(2000, monthCount, 1), Time.newInstance(0, 0, 0, 0)).formatGMT('MMM') : This will return Month in string based on integer value ' monthCount ' , (1=JAN, 2=FEB...) Number of 'M' will decide how many character value should be return. Note : Use M for Month, D for day(days of year), Y for year.

Trigger Context Variables

These variables are contained in the  System.Trigger  class. Variable Usage isExecuting Returns true if the current context for the Apex code is a trigger , not a Visualforce page, a Web service, or an  executeanonymous()  API call. isInsert Returns  true  if this trigger was fired due to an insert operation , from the Salesforce user interface, Apex, or the API. isUpdate Returns  true  if this trigger was fired due to an update operation , from the Salesforce user interface, Apex, or the API. isDelete Returns  true  if this trigger was fired due to a delete operation , from the Salesforce user interface, Apex, or the API. isBefore Returns  true  if this trigger was fired before any record was saved. isAfter Returns  true  if this trigger was fired after all records were saved. isUndelete* Returns  true  if this trigger was fired after a record is recovered from the Recycle Bin . This recovery c...

Development related Updates of Spring 19

Whether you’re using Lightning components, Visualforce, Apex, or our APIs with your favorite programming language, these enhancements to Lightning Platform help you develop amazing applications, integrations, and packages for resale to other organizations. Lightning Components: Introducing Lightning Web Components Lightning Web Components is a new programming model built on the Web Components standard. Lightning web components bring modern JavaScript and web standards to the Lightning Component framework, improve developer productivity, and boost performance. Also, Locker Service is renamed Lightning Locker. Visualforce: Show a Toast in JavaScript, Improved Component Compatibility, and Postponed Critical Update Use a new JavaScript function to show a toast message. The  <apex:detail>  and  <apex:enhancedList>  components have improved compatibility when working with custom objects. The maximum view state size has increased. The critical update that r...

Features in the Salesforce Spring ’19 Release

The  Salesforce Spring ‘19 release  is quickly approaching and soon you’ll be able to take advantage of exciting new features and functionality. Here is a recap of 7 of my favorite features in the Salesforce Spring ’19 release, including pinned lists, lightning web components, customized help menu and more. Key Dates 1. Jump Right into Your Most Important List View with Pinned Lists Do you have a go-to list view that you want to load as your default list? Now you can. With pinned lists, all users can make any list their new default. Learn more about pinned lists → 2. New Lightning Web Components Spring ’19 introduces a new type of Lightning component called a Lightning web component. What used to be called a Lightning component is now called an Aura component. Aura components and Lightning web components work together and are both part of the Lightning Component framework. Learn more about new Lightning Web Components → 3. Add Custom Resources to the Re...

Deprecated and New features in Spring 19

Deprecated Default Values Without Square Brackets for Array, Set, and List Attributes Setting a default value without square brackets is deprecated and can lead to unexpected behavior. To set a default value for these attribute types, surround comma-separated values with  [] ; for example,  default="['red', 'green', 'blue']" . Where:  This change applies to orgs with Lightning components in Lightning Experience, Salesforce Classic, and all versions of the Salesforce app. How:  Here’s an example of attributes for an array, a list, and a set. <aura:attribute name="colorArray" type="String[]" default="['red', 'green', 'blue']" /> <aura:attribute name="colorList" type="List" default="['red', 'green', 'blue']" /> <aura:attribute name="colorSet" type="Set" default="['red', 'green', ...

Send attachment Via Apex using Templates

Email Via Apex using Email Templates : Contact con = [Select id from contact Limit 1]; List<String> emailsAll = new List<String>(); emailsAll.add(' toEmailAddress@gmail.com '); List<String> emailsCC = new List<String>(); emailsCC.add('cC EmailAddress@gmail.com '); String TemplateId = [SELECT Id FROM EmailTemplate WHERE DeveloperName = 'Multi_Language_Template_Test' LIMIT 1].Id; List<Messaging.SingleEmailMessage> mails =  new List<Messaging.SingleEmailMessage>();                    // Step 1: Create a new Email         Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();                 // Step 2: Set list of people who should get the email         mail.setToAddresses(emailsAll);         mail.setCcAddresses(emailsCC);         // Step 3...

Platform Developer I Certification Maintenance (Spring '19)

Platform Developer I Certification Maintenance (Spring '19) 1. Which Apex interface can be implemented to allow My Domain users to log in with something other than their username and password? A. Auth.AuthToken B. Auth.VerificationMethod C. Auth.LoginDiscoveryHandler D. Auth.MyDomainLoginDiscoveryHandler 2. With Spring '19, which method returns a list of OrgLimit instances used to investigate limits and their names, current value, and maximum value? A. getAll() from the System.OrgLimit Class B. getAll() from the System.OrgLimits Class C. getInstances() from the System.OrgLimit Class D. getInstances() from the System.OrgLimits Class 3. With Spring '19, which properties of an unhandled Apex exception are available in Event Monitoring log files? A. Static variable state and stack trace B. Exception type, name, and static variable state C. Stack trace, user's location, and exception type D. Exception message, exception type n...

Translate