Posts

Showing posts with the label Salesforce Lightning
Lightning Web Component lightning-file-upload and edit file content A lightning-file-upload component provides an easy and integrated way for users to upload multiple files. The file uploader includes drag-and-drop functionality and filtering by file types. to use lightning-file-upload you must have recordId of the record that the uploaded file is associated with, lightning-file-upload component will appear to disable in the absence of recordId. Below code will upload the images and displays them with onclick functionality which will enable you to edit the title and description of uploaded files with delete functionality. Points to remember:   1. Not suppo rted in  Lightning Out or standalone apps, and displays as a disabled input. 2. The file uploader cannot be used to u pload files with the following file extensions: .htm, .html, .htt, .htx, .mhtm, .mhtml, .shtm, .shtml, .acgi, .svg. 3. lwc file-upload multiple don't work in android, In android you canno...
Image
lightning:map component lightning:map introduced in winter 19 which can be use display a map of one or more locations using Google Maps. We can pass markers to the component to define the locations to map. A marker can be a coordinate pair of latitude and longitude, or a set of address elements: City, Country, PostalCode, State, and Street. This component requires API version 44.0 and later. lightning:map has required attribute mapMarkers which accepts array of markers that indicate location. A market contains Location information:  This can be a coordinate pair of latitude and longitude, or an address composed of address elements. Descriptive information:  This is information like title, description and an icon which is information relevant to the marker but not specifically related to location. Example Create a new Object called 'Tower' with two new custom fields 1. Field Label: State     Type: Master-Detail (Account) 2. Field Label: Locati...
Image
Lightning Tooltip A lightning:helptext component displays an icon with a popover containing a small amount of text describing an element on screen. The popover is displayed when you hover or focus on the icon that's attached to it. By default, the tooltip uses the utility:info icon but you can specify a different icon with the iconName attribute.  Visit   https://lightningdesignsystem.com/icons/#utility   to view the utility icons. Let's create tooltip component and will try to make it  reusable. LightningToolTipcmp Above Lightning tooltip component can be reused by passing the help text as a attribute. Reference:  Lightning Web Components
Image
CAPTCHA in Lightning Use below code to implement captcha in your lightning component. Lightning_CAPTCH.cmp Lightning_CAPTCHController.js Lightning_CAPTCHHelper.js Add caption