Posts

Showing posts from September, 2018

Salesforce : Lightning DataTable

Image
Lightning DataTable LightningDataTableController(Apex Controller ) public class LightningDataTableController{ @AuraEnabled public static List<Contact> fetchAccountContacts(String contactId) { List<Contact> lstContact=new List<Contact>(); lstContact=[select id ,Name,Email,Phone from contact where accountid=:contactId]; return lstContact; } } LightningDataTable.cmp (Component) <aura:component controller="LightningDataTableController" implements="force:hasRecordId,flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader" access="global"> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <aura:attribute name="data" type="Object"/> <aura:attribute name="columns" type="List" default="[{label: 'Name', fieldName: 'LinkName',

Salesforce Certified Platform Developer I – Spring ’18 Release Exam

Image
Salesforce Certified Platform Developer I – Spring ’18 Release Exam 1 of 5. What is the replacement that Salesforce recommends for Force . com IDE 2 Beta? A.  Workbench. B.  Developer Console. C.  MavensMate for Sublime Text. D.  Salesforce Extensions for VS code. Reference 2 of 5. What can be used to control the styling and behavior of the Salesforce login process? A.  Visaulforce page login flow. B.  Lightning Component Login flow. C.  Process Builder on login event. D.  Quick Action on login event. Reference 3 of 5. Which Salesforce command line interface (CLI) command supports the generation of new Apex triggers? A.  force:schema:sobject: -t | createtrigger B.  force:data:sobject:createtrigger C.  force:trigger:new D.  force:apex:trigger:create Reference 4 of 5. Which global variable can be used to detect whether a Visualforce page is loaded in Lightning apps with console navigation or standard navigation? A.  $Browser.formFactor. B.  $UI.UserT

Production Operations : Deactivate/Delete the Apex Class/Triggers with Best Ways

Image
DEACTIVATE THE TRIGGER AND CHANGES INTO CLASS 1. Active Check Box : This is the simplest way to do of all is Deactivate your trigger in your sandbox by unchecking the Active checkbox of the trigger.Create an outbound change set, upload and deploy the change set to production. 2. Comment Code : The other simpler way is comment your entire apex trigger code in your sandbox and then use outbound change set to deploy to production. To comment code, you need to use /* and */ . Anything in between those will be commented and this method is also used for Apex class. trigger ContactTrigger on Contact (before insert){ /* your entire code */ } 3. FROM CUSTOM SETTINGS : You can control whether a trigger should run or not. Create a custom setting (Trigger_Config__c). Add a checkbox field “Is Active” and Text field for Trigger Name and its status in IsActive checkbox control all process. Apex trigger, add an IF condition at the top to check if the Trigger status in Custom settings

Uploading Files in lightning Component without Apex Code

Image
Uploading Files in lightning Component without Apex Code It allows users to upload multiple files to a record. The file uploader includes drag-and-drop functionality and filtering by file types. Apex have some limitations: * Extensive coding. * Cannot exceed file size limit of 6MB. Salesforce has come up with a new tag that provides an easy way to upload your files as attachment. You can also drag and drop files that need to be uploaded. The recordId is a required attribute as it associates the file to the parent record. Maximum you can upload upto 10 files simultaneously. The maximum file size that you can upload is 2GB. We can use this component for record detail page in Any Platform. Files with following extension cannot be used: .htm, .html, .htt, .htx, .mhtm, .mhtml, .shtm, .shtml, .acgi, .svg Note : Label and recordId are required attributes. If recordId is not specified, the component is visible in disabled state. FileUploadLightningComponent.cmp &

Communications between Lightning Components : Salesforce

Image
Communications between Lightning Components : Salesforce Salesforce have new lightning framework to create components in lightning framework which is fast with high performance to pass data from one lightning component to another. For this salesforce provides various ways to communicate between lightning components. Below are the list of ways you can communicate :- 1. Using attribute in lightning components. 2. Using aura:method to pass data. 3. Using component type event. 4. Using application type event. 5. Using System Events. 1. Using Attributes :- we have a parent component in which we have a Boolean attribute which i want to pass to child component for further processing. c:parentComponent.cmp <aura:component> <aura:attribute name=”showTable” default=”false” type=”boolean”/> <lightning:button label=”show table” onclick=”{! c.showBoolean }” /> <c:childComponent tableDisplay=”{!v.showTable}”/> </aura:component> c:parentCompone