This file contains hidden or 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 FieldSetFormController { | |
@AuraEnabled | |
public static FieldSetForm getForm(Id recordId, String objectName, String fieldSetName) { | |
FieldSetForm form = new FieldSetForm(); | |
form.Fields = getFields(recordId, objectName, fieldSetName); | |
form.Record = getRecord(recordId, objectName, form.Fields); | |
return form; | |
} |
This file contains hidden or 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
// Method to perform callouts | |
public String MakeCallout(string description, string keyToVerify){ | |
// define a response to caller | |
String outcomeMsg; | |
// define basic information for later, store these in a protected custom setting | |
string endpoint = 'http://api.yourendpoint.com/'; // be sure this is configured in "Remote Site Settings" | |
string resource = 'products/'; | |
string username = 'api_user'; |
This file contains hidden or 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
// example of how to configure SecuritySettings in your scratch org. | |
{ | |
"orgName": "Acme", | |
"edition": "Enterprise", | |
"features": [], | |
"settings": { | |
"mobileSettings": { | |
"enableS1EncryptedStoragePref2": true | |
}, | |
"securitySettings": { |
This file contains hidden or 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
{ | |
"orgName": "Salesforce - Dev Org", | |
"edition": "Developer", | |
"features": [ | |
"Pardot" | |
], | |
"settings": { | |
"pardotSettings": { | |
"enablePardotEnabled": true, | |
"enablePardotAppV1Enabled": true, |
This file contains hidden or 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 LibraryName='Demo Download Library'; | |
ContentWorkspace ws = [SELECT Id, RootContentFolderId FROM ContentWorkspace WHERE Name = :LibraryName LIMIT 1]; | |
Set<string> fileNameList = new Set<string>(); | |
List<ContentDocumentLink> filesToDelete= new List<ContentDocumentLink>(); | |
string csvString=''; | |
String domainUrl=URL.getSalesforceBaseUrl().toExternalForm(); | |
for(ContentDocumentLink con:[select id,LinkedEntityId,ContentDocumentId ,ContentDocument.LatestPublishedVersion.Title from ContentDocumentLink where LinkedEntityId=:ws.Id]){ | |
csvString = csvString +domainUrl+'/sfc/servlet.shepherd/version/download/'+con.ContentDocument.LatestPublishedVersionId+'\n'; | |
} |
This file contains hidden or 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
global without sharing class SandboxPostCopyUpd implements SandboxPostCopy { | |
global void runApexClass(SandboxContext context) { | |
LIst<Contact> ConList = [SELECT ID FROM CONTACT]; | |
for (Contact con : ConList) { | |
con.Email = '[email protected]'; | |
} | |
update ConList; | |
} | |
} |
This file contains hidden or 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
<!-- TODO: Review Ant v1.8 local properties --> | |
<project xmlns:sf="antlib:com.salesforce"> | |
<!-- Download from Salesforce Tools page under Setup --> | |
<typedef | |
uri="antlib:com.salesforce" | |
resource="com/salesforce/antlib.xml" | |
classpath="${basedir}/lib/ant-salesforce.jar"/> | |
<!-- Download from http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ --> |
This file contains hidden or 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
Afghanistan | |
Albania | |
Algeria | |
Andorra | |
Angola | |
Antigua & Deps | |
Argentina | |
Armenia | |
Australia | |
Austria |
This file contains hidden or 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
private static void saveSobjectSet(List <Sobject> listToUpdate) { | |
Integer SFDC_CHUNK_LIMIT = 10; | |
// Developed this part due to System.TypeException: Cannot have more than 10 chunks in a single operation | |
Map<String, List<Sobject>> sortedMapPerObjectType = new Map<String, List<Sobject>>(); | |
Map<String, Integer> numberOf200ChunkPerObject = new Map<String, Integer>(); | |
for (Sobject obj : listToUpdate) { | |
String objTypeREAL = String.valueOf(obj.getSObjectType()); | |
if (! numberOf200ChunkPerObject.containsKey(objTypeREAL)){ |
This file contains hidden or 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
<!-- | |
@description : | |
@author : [email protected] | |
@group : | |
@last modified on : 06-24-2021 | |
@last modified by : [email protected] | |
Modifications Log | |
Ver Date Author Modification | |
1.0 06-10-2021 [email protected] Initial Version | |
--> |