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, api } from 'lwc'; | |
import saveTheChunkFile from '@salesforce/apex/FileUploadService.saveTheChunkFile'; | |
import { ShowToastEvent } from 'lightning/platformShowToastEvent'; | |
const MAX_FILE_SIZE = 4500000; | |
const CHUNK_SIZE = 750000; | |
export default class UploadFile extends LightningElement { | |
@api recordId; | |
fileName = ''; |
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 with sharing class FileUploadService { | |
@AuraEnabled | |
public static Id saveTheChunkFile(Id parentId, String fileName, String base64Data, String contentType, String fileId){ | |
base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8'); | |
if ( String.isBlank(fileId) ) { | |
fileId = saveFiles(parentId, fileName, base64Data ); | |
} else { | |
appendToFile(fileId, base64Data); |
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
@RestResource(urlMapping='/whatsapp/webhooks/v1/*') | |
global without sharing class WhatsAppWebhook { | |
private static Final String SIGNATURE_VALID_MESSAGE = 'Signature Verified'; | |
private static Final String SIGNATURE_NOT_VALID_MESSAGE = 'Signature could not be verified'; | |
@HttpGet // GET | |
global static void doGet() { | |
RestResponse response = RestContext.response; | |
RestRequest request = RestContext.request; |
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
.btnIconOverlay { | |
position: absolute; | |
z-index: 1; | |
margin: 0% 0px 0px 88%; | |
} |
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
1. What is SOQL in Salesforce? | |
2. What is the Structure of the SOQL Query in Salesforce? | |
3. List All the Contact Records | |
4. List All the Contact Records where the Email is not blank | |
5. List All the Contact Records Where the Email is Blank | |
6. List All the Contact Records Where the Title contains the developer | |
7. List All the Contact Records Where the Title Starts with the Manager | |
8. List All the Opportunity Where the Amount is more than 29000 | |
9. List All the Opportunity count state wise | |
10. List All the Opportunity Amount Stage Wise |
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
if(pm.response.code === 200 || pm.response.code === 201){ | |
var responseBody = pm.response.json(); | |
pm.environment.set('access_token', responseBody.access_token); | |
pm.environment.set('refresh_token', responseBody.refresh_token); | |
pm.environment.set('scope', responseBody.scope); | |
pm.environment.set('id_token', responseBody.id_token); | |
pm.environment.set('instance_url', responseBody.instance_url); | |
pm.environment.set('token_type', responseBody.token_type); |
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, track, wire } from 'lwc'; | |
import listAllMessages from '@salesforce/apex/WhatsAppLWCService.listAllMessages'; | |
import sendTextMessage from '@salesforce/apex/WhatsAppLWCService.sendTextMessage' | |
import getSingleMessage from '@salesforce/apex/WhatsAppLWCService.getSingleMessage'; | |
import { subscribe, unsubscribe, onError } from 'lightning/empApi'; | |
export default class Chatcomponent extends LightningElement { | |
@track messages; |
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 variant="Narrow" > | |
<lightning-button if:true={messageList} variant="border-filled" | |
label="Chat with another customer" onclick={handleAnOtherChat} slot="actions"> | |
</lightning-button> | |
<lightning-spinner alternative-text="Loading" size="small" if:true={isSpinner}></lightning-spinner> | |
<div class="slds-p-horizontal_small"> |
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 { api, LightningElement, track, wire } from 'lwc'; | |
import getContentDetails from '@salesforce/apex/ContentManagerService.getContentDetails'; | |
import deleteContentDocument from '@salesforce/apex/ContentManagerService.deleteContentDocument'; | |
import getLoginURL from '@salesforce/apex/ContentManagerService.getLoginURL'; | |
import { NavigationMixin } from 'lightning/navigation'; | |
const columns = [ | |
{ label: 'Title', fieldName: 'Title', wrapText : true, | |
cellAttributes: { | |
iconName: { fieldName: 'icon' }, iconPosition: 'left' |
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
Product2 p = new Product2(); | |
p.Name = 'Test Product'; | |
p.Description='Test Product'; | |
p.productCode = 'ABC'; | |
p.isActive = true; | |
insert p; | |
PricebookEntry standardPrice = new PricebookEntry(); | |
standardPrice.Pricebook2Id = Test.getStandardPricebookId(); | |
standardPrice.Product2Id = p.Id; |
NewerOlder