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 } from 'lwc'; | |
import { ShowToastEvent } from 'lightning/platformShowToastEvent'; | |
export default class ToastComponent extends LightningElement { | |
@api title; | |
/* Title of the toast */ | |
@api message; | |
/* | |
Message of the toast. If you wanted to display the Clickable url in the toast then the message format will be | |
'Record {0} created! See it {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
public class OTPGenerator { | |
@InvocableMethod(description='This method will be generating the OTP for users to Login' | |
label='Generate OTP' | |
category='OTP') | |
public static List<String> generateOtp(){ | |
List<String> responseList = new List<String>(); | |
String randomIntegerString = string.valueof(Math.abs(Crypto.getRandomInteger())); | |
String otp = randomIntegerString.substring(0,6); | |
responseList.add(otp); |
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
<apex:page standardController="Lead" recordSetVar="leadRecord" extensions="VE_AutoLeadController" lightningStylesheets="true" > | |
<apex:slds /> | |
<!-- LEFT({!$Api.Partner_Server_URL_260}, FIND( '/services', {!$Api.Partner_Server_URL_260})) --> | |
<!-- LEFT( {!$Flow.FaultMessage}, Find("You can look up ExceptionCode", {!$Flow.FaultMessage} ) -1) --> | |
<apex:pageBlock title="Selected Records"> | |
<apex:pageBlockTable value="{!selectedLeadRecords}" var="lead"> | |
<apex:column headerValue="Name" value="{!lead.Name}" /> | |
<apex:column headerValue="Email" value="{!lead.Email}" /> | |
<apex:column headerValue="Company" value="{!lead.Company}" /> | |
<apex:column headerValue="Rating" value="{!lead.Rating}" /> |
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 VE_AutoLeadController { | |
public List<String> leadIdsSet { get; set; } | |
public List<Lead> selectedLeadRecords { get; set; } | |
public VE_AutoLeadController(ApexPages.StandardSetController setController) { | |
selectedLeadRecords = (Lead[])setController.getSelected(); | |
leadIdsSet = new List<String>(); | |
for(sObject sobj : setController.getSelected()){ | |
leadIdsSet.add( (String)sObj.get('Id') ); |
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 AutoConvertLeads { | |
@InvocableMethod(label='Custom Lead Convert' | |
description='Apex Class converts the leads based in the Ids sent from flow' | |
category='Lead') | |
public static List<List<String>> LeadCovert(List<List<String>> leadIds){ | |
// Query on the LeadStatus Object to find the correct converted status | |
LeadStatus convertedLeadStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true Limit 1]; | |
List<Database.LeadConvert> leadsToConvert = new List<Database.LeadConvert>(); | |
List<String> leadIdsToConvert = leadIds.get(0); | |
// Loop with the Records Ids and prepare to Conver leads |
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
<apex:page standardController="Lead" recordSetVar="leadRecord" extensions="VE_AutoLeadController" lightningStylesheets="true" > | |
<apex:slds /> | |
<!-- LEFT({!$Api.Partner_Server_URL_260}, FIND( '/services', {!$Api.Partner_Server_URL_260})) --> | |
<!-- LEFT( {!$Flow.FaultMessage}, Find("You can look up ExceptionCode", {!$Flow.FaultMessage} ) -1) --> | |
<apex:pageBlock title="Selected Records"> | |
<apex:pageBlockTable value="{!selectedLeadRecords}" var="lead"> | |
<apex:column headerValue="Name" value="{!lead.Name}" /> | |
<apex:column headerValue="Email" value="{!lead.Email}" /> | |
<apex:column headerValue="Company" value="{!lead.Company}" /> | |
<apex:column headerValue="Rating" value="{!lead.Rating}" /> |
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
@IsTest | |
public class OpenCageGeocoderUtilErrorMock implements HttpCalloutMock { | |
public static HttpResponse respond(HttpRequest httpReq){ | |
String fakeResponse = '{}'; | |
HttpResponse httpRes = new HttpResponse(); | |
httpRes.setStatusCode(401); | |
httpRes.setHeader('Content-Type', 'application/json'); |
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 TransactionLogHandler { | |
public static void doHandleException(System.Exception ex , String processName){ | |
//TransactionLogHandler.doHandleException(); | |
Error_Log__c transactionLog = new Error_Log__c ( | |
Log_Details__c = ex.getStackTraceString() +'<br/> <strong> Mesage is </strong> ' + ex.getMessage() | |
+ '<br/> ' + ex.getCause() +' <br/> '+ ex.getTypeName()+' <br/> '+ex.getLineNumber(), | |
Lod_DateTime__c = System.Now(), | |
Process_Name__c = processName | |
); |
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
<!-- sldsValidatorIgnore --> | |
<!-- sldsValidatorIgnore --> | |
<!-- | |
@description : | |
@author : Amit Singh | |
@group : | |
@last modified on : 12-21-2021 | |
@last modified by : Amit Singh | |
--> | |
<template> |
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
<design:component> | |
<design:attribute name="value" description="The value for RichText Area Component"/> | |
<design:attribute name="label" description="The Label for RichText Area Component"/> | |
<design:attribute name="required" description="Input is required or not value should be true or false"/> | |
<design:attribute name="placeholder" description="The place holder"/> | |
</design:component> |