Minimal repro for the Chrome style recalc issue.
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 Address | |
{ | |
// Internally used to determine if valueOf method should read the state and country picker fields | |
private static Boolean stateAndCountryPickersEnabled = false; | |
static | |
{ | |
// Are State and Country pickers enabled in this org? | |
Map<String, Schema.SObjectField> accountFields = Account.sObjectType.getDescribe().fields.getMap(); | |
stateAndCountryPickersEnabled = accountFields.containsKey('BillingStateCode'); |
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
window.open('/lightning/o/Event/new'); | |
var urlEvent = $A.get("e.force:navigateToURL"); | |
urlEvent.setParams({ | |
"url": "/lightning/o/Event/new" | |
}); | |
urlEvent.fire(); | |
var createRecordEvent = $A.get("e.force:createRecord"); | |
createRecordEvent.setParams({ |
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 CurrencyUpdater { | |
list <CurrencyType> ctl = new list<CurrencyType>([SELECT Id,IsoCode,ConversionRate FROM CurrencyType WHERE IsActive = TRUE AND IsCorporate = FALSE]); | |
map <string, CurrencyType> ctMap = new map<String, CurrencyType>(); | |
public CurrencyUpdater () { | |
for (CurrencyType ct : ctl){ | |
ctMap.put(ct.IsoCode,ct); | |
} | |
} |
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 Flow_FindDupes { | |
//https://developer.salesforce.com/forums/?id=906F0000000AzDeIAK | |
@InvocableMethod(label='Get Dupes' description='Returns something') | |
public static List<Contact> getDuplicateContacts(List<Contact> contacts) { | |
system.debug('contacts size = ' + contacts.size()); | |
list<sObject> dasContacts = new list<sobject>(); | |
dasContacts.addall((List<sObject>)(contacts)); | |
list<Contact> duplicateContacts = new list<Contact>(); |
This fork of JamieMason's implementation changes the key
parameter to be an array of keys instead of just a single key. This makes it possible to group by multiple properties instead of just one.
const groupBy = keys => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = keys.map(key => obj[key]).join('-');
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
/*Javascript snippet to use HTML5 localStorage easily. | |
Properly handles situation like 'localStorage not being supported by the browser' and excedding localSorage quota. | |
Supports storing any kind of data */ | |
/*key should be String, value can be any Javascript object */ | |
function writeToLocalStorage(key,value) | |
{ | |
if(typeof(Storage) == 'undefined') | |
{ |
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
'use strict' | |
class JSONMap extends Map { | |
constructor (value) { | |
let mapArgs = [] | |
if (value) { | |
for (let k of Object.keys(value)) { | |
mapArgs.push([ k, value[k] ]) | |
} | |
} |
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
/** | |
* Created by brettbarlow on 2/24/18. | |
*/ | |
// LightningComponentInVisualforce | |
window._lightningComponentInVisualforce = (function() { | |
return { | |
LightningComponent : function(type, attributes, locator) { | |
this.type = type; | |
this.attributes = attributes; |
To send a request via the sandbox, you can use pm.sendRequest.
pm.test("Status code is 200", function () {
pm.sendRequest('https://postman-echo.com/get', function (err, res) {
pm.expect(err).to.not.be.ok;
pm.expect(res).to.have.property('code', 200);
pm.expect(res).to.have.property('status', 'OK');
});
});
OlderNewer