Posts

Showing posts from April, 2022

Scan barcodes from Salesforce Mobile App

Image
Hello Trailblazers, Today I am going discuss a newly added functionality to Salesforce Mobile platform which has given us ability to scan the barcodes from salesforce mobile app using Lightning Web Component implementation. With the help of this Barcode Scanner API we can now read UPC, QR and other type of barcodes from Lightning Web Component.  This API is made generally available by Salesforce after February 2022. Lightning Web Component uses your mobile camera and mobile OS capabilities to scan the barcode and then sends data back to LWC from where process was invoked. You can use any UI(Button, link etc.) to start barcode scanning. So, the general flow will be initiate barcode scanning from lightning web component then mobile camera will be opened and once valid barcode is scanned you will be returned to your lightning web component which initiated this scan with data which you can process. BarcodeScanner API This barcode scanner API has capability to scan single barcode as wel...

Upload file from Flow Screen - Salesforce

Image
Hello Trailblazers, Today I am going to explain how we can upload a file using salesforce flows. Recently salesforce has introduced an input component – File Upload, with the help of which we can upload files as well through screen in flows.  Before using File Upload component, let’s understand some properties to configure this component. To set these attributes we can enter simple text value or create resources or use flow constants. Attribute    Description  Accepted Formats  This attribute specifies the list of file types that would be accepted as input. This value should be text field with multiple extensions separated by comma. Example – ‘.docx,.pdf,.pptx’  Allow Multiple Files  If this attribute is set True then multiple file upload will be enabled. Use global constants here.  API Name  API Name for component.  Disabled  Whether to keep component disabled or not.  File Upload Label Information tex...

Salesforce Lightning empAPI Module - Test Platform, CDC Events

Image
  Hello Trailblazers, In this blog I have explained use of EMP API which is used to subscribe for events. You can create Lightning Component which uses this EMP API for subscribing to various streaming channels such as Platform Events, Change Data Capture Events, Generic Events. We can use this implementation for testing Platform Events or Change Data Capture events in local environment. Lightning/empApi module has below methods which are used for implementing events subscription.  Method Name    Parameter Name  Description  subscribe    Subscribes to the streaming channel, this gives subscription object which we use to unsubscribe later.    onMessageCallback  Callback function which is invoked whenever an event is received    repla...