Source : https://stackoverflow.com/questions/7685175/autoformat-ssn-while-entering-the-number
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 implements="flexipage:availableForAllPageTypes" access="global" controller="LightningRecordEditFormController"> | |
<aura:attribute name="disabled" type="Boolean" default="false" /> | |
<aura:attribute name="layoutSections" type="List" /> | |
<aura:attribute name="saved" type="Boolean" default="false" /> | |
<aura:attribute name="showSpinner" type="Boolean" default="true" /> | |
<aura:attribute name="fieldName" type="String" default="StageName" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<lightning:card title=""> |
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 implements="flexipage:availableForAllPageTypes" access="global" controller="LightningRecordEditFormController"> | |
<aura:attribute name="disabled" type="Boolean" default="false" /> | |
<aura:attribute name="layoutSections" type="List" /> | |
<aura:attribute name="saved" type="Boolean" default="false" /> | |
<aura:attribute name="showSpinner" type="Boolean" default="true" /> | |
<aura:attribute name="fieldName" type="String" default="StageName" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<lightning:card title=""> |
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 HttpMock implements HttpCalloutMock { | |
private static final String ANY_URL = null; | |
private Map<String, Map<String, Object>> responses = new Map<String, Map<String, Object>>(); | |
// PUBLIC |
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
@testSetup | |
private static void createTestData() { | |
ContentWorkspace testWorkspace = new ContentWorkspace(Name='TEST CLASS', DeveloperName='TEST_CLASS'); | |
insert testWorkspace; | |
} | |
@isTest | |
private static void testGetFilesList(){ | |
ContentWorkspace testWorkspace = [Select Id from ContentWorkspace where Name = 'TEST CLASS']; |
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 virtual class GenericTrigger { | |
public SObject[] recordOldList; | |
public SObject[] recordNewList; | |
public Map<Id, SObject> recordOldListMap; | |
public GenericTrigger(SObject[] recordOldList, SObject[] recordNewList) { | |
this.recordNewList = recordNewList == null ? new SObject[] {} : recordNewList.clone(); | |
this.recordOldList = recordOldList == null ? new SObject[] {} : recordOldList.clone(); | |
this.recordOldListMap = new Map<Id, SObject> {}; | |
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
String join(List<String> values) { | |
List<String> valueCopy = new List<String>(values); | |
if(valueCopy.isEmpty()) | |
return null; | |
String result = valueCopy[0]; | |
valueCopy.remove(0); | |
while(!valueCopy.isEmpty()) { | |
result += ',' + valueCopy[0]; | |
valueCopy.remove(0); | |
} |
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
trigger AttachFile on Lead (after insert) { | |
List<ContentDocumentLink> cdeInsertList = new List<ContentDocumentLink>(); | |
System.debug('line3'); | |
Map<Id, Id> caseId2 = new Map<Id, Id>(); | |
for(Lead ldItr : Trigger.New) { | |
caseId2.put(ldItr.Case__c, ldItr.Id); | |
} | |
System.debug('line8'); | |
for(ContentDocumentLink cdl : [SELECT |
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
without sharing public class CaseCreationService { | |
//Queries | |
//How do we autoselect the product ? chat ? | |
//If no contact found should we create one ? | |
//How do we link the product | |
private final Case caseRecord = new Case(); | |
private String contactName; | |
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
/** | |
* @File Name : CreateMissingContactUserLinkController.cls | |
* @Description : | |
* @Author : | |
* @Group : | |
* @Last Modified By : | |
* @Last Modified On : 2020-01-29 15:32:43 | |
* @Modification Log : | |
* @Param | |
* @Return |