This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EmailService { | |
public string subject{get;set;} // mail subject | |
public List<String> toAddresses{get;set;} // send to | |
public List<String> CCAddresses{get;set;} // cc | |
public String body{set;get;} // mail plain body | |
public string displayName{set;get;} // from | |
public boolean isAttachment {set;get;} // if we have to send attachment file in mail | |
public Map<String,String> attachFiles {set;get;} // key = attachmentName and value =attachmentBody | |
public boolean isHtml{set;get;} | |
public List<Messaging.EmailFileAttachment> attachments; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WhatsAppMessageService { | |
@AuraEnabled | |
public static void sendMessage(string mobileno,string message) | |
{ | |
errorResponseWrapper erw; | |
final String fromNumber = '+14155238886'; | |
String account = 'ACa2e448aaa0e51ed81a56ff55b6635cca'; | |
String token = '<your token>'; | |
HttpRequest req = new HttpRequest(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LightningElement, wire } from 'lwc'; | |
import getContactList from '@salesforce/apex/ContactController.getContactList'; | |
import { ShowToastEvent } from 'lightning/platformShowToastEvent'; | |
const columns = [ | |
{ label: 'First Name', fieldName: 'FirstName' }, | |
{ label: 'Last Name', fieldName: 'LastName' }, | |
{ label: 'Title', fieldName: 'Title' }, | |
{ label: 'Phone', fieldName: 'Phone', type: 'phone' }, | |
{ label: 'Email', fieldName: 'Email', type: 'email' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HttpCallout { | |
public static String restGet(String endPoint, String method, String sid) { | |
try | |
{ | |
Http h = new Http(); | |
HttpRequest hr = new HttpRequest(); | |
hr.setHeader('Authorization', 'Bearer ' + sid); | |
hr.setTimeout(60000); | |
hr.setEndpoint(endPoint); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="FileUploadController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > | |
<!--Record Id of current object where this component will be added. --> | |
<aura:attribute name="recordId" type="Id" /> | |
<!--Showing spinner while uploading --> | |
<aura:attribute name="showLoadingSpinner" type="boolean" default="false" /> | |
<aura:attribute name="fileName" type="String" default="No File Selected.." /> | |
<!--List of file which are uploaded --> | |
<aura:attribute name="FilesUploaded" type="List" /> | |
<div class="row"> | |
<div class="slds-grid slds-gutters"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<lightning-card title="SMS Sender" icon-name="standard:action_list_component"> | |
<div class="slds-grid slds-grid_vertical"> | |
<div class="slds-col slds-size_1-of-1"> | |
<lightning-input type="text" name="mobileNumber" data-id="mobileNumber" label="Enter Mobile Number"></lightning-input> | |
</div> | |
<div class="slds-col slds-size_1-of-1"> | |
<lightning-input type="text" name="smsBody" data-id="smsBody" label="Enter SMS Message"></lightning-input> | |
</div> | |
<div class="slds-col slds-size_1-of-1"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
* Author: Dhanik Lal Sahni | |
* Date: Oct 8, 2019 | |
* Descpription: Base Exception for throwing error in code. | |
*/ | |
public class BaseException extends Exception { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class S3Controller { | |
@AuraEnabled | |
public static void UploadDocToS3Server(string recordId) | |
{ | |
UploadDocument(recordId); | |
} | |
@future(callout=true) | |
public static void UploadDocument(string recordId) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
* Author: Dhanik Lal Sahni | |
* Date: Oct 8, 2019 | |
* Descpription: AWS Service for uploading file | |
*/ | |
public class AWSService { | |
public string awsKey {get;set;} | |
public string awsSecret {get;set;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="ImageController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > | |
<lightning:card title="Capture Screen"> | |
<lightning:layout horizontalAlign="spread"> | |
<lightning:layoutItem padding="around-small"> | |
<h1> | |
MDN - WebRTC: Still photo capture demo | |
</h1> | |
<div class="camera"> | |
<video id="video">Video stream not available.</video> | |
<button id="startbutton" onclick="{!c.doInit}">Take photo</button> |
NewerOlder