Skip to content

Instantly share code, notes, and snippets.

@az-ak
az-ak / gist:c6a68235bab20a063ee261227da81577
Created May 22, 2017 03:04
Find formula fields which use JavaScript in HYPERLINK function
// All the standard and custom objects in the Org
List<EntityDefinition> entityDefs = [select QualifiedApiName from EntityDefinition];
// Forming a list of Entity API names
List<String> entityNames = new List<String>();
for(EntityDefinition entityDef: entityDefs){
if(!entityDef.QualifiedApiName.endsWith('kav')){
entityNames.add(entityDef.QualifiedApiName);
}
}
@az-ak
az-ak / SandboxPostCopyUpd.cls
Last active November 17, 2021 11:15
Apex SandboxPostCopy example
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 = 'dummy@example.com';
}
update ConList;
}
}
<apex:page docType="html-5.0" sidebar="false">
<apex:stylesheet value="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"/>
<script>
jQuery(document).ready(function($) {
$.ajax('/services/data/v38.0/limits',
{
beforeSend: function(xhr) {
// Set the OAuth header from the session ID