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
List<Network> communities = [ SELECT Id, Name, UrlPathPrefix, Status FROM Network ]; | |
for (Network community : communities) { | |
System.debug(community.Name + ': ' + community); | |
} | |
// or via Connect API | |
List<ConnectApi.Community> communitiesConnect = ConnectApi.Communities.getCommunities().communities; | |
for ( ConnectApi.Community community : communitiesConnect) { |
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
mysql -u username -p database_name < file.sql |
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
document.querySelectorAll('*').forEach(el => el.contentEditable = true) |
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
[ | |
{ | |
"code": "PUB", | |
"label": "Australian Public Company" | |
}, | |
{ | |
"code": "PRV", | |
"label": "Australian Private Company" | |
}, | |
{ |
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
List<PicklistEntry> fields = Account.SObjectType.getDescribe().fields.getMap().get('Type').getDescribe().getPicklistValues(); | |
for (PicklistEntry picklistEntry : fields) { | |
System.debug(picklistEntry.getLabel() + ' with value: ' + picklistEntry.getValue()); | |
} |
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
function getSfSessionStorage() { | |
let sfSessionStorage = {}; | |
// find the sessionStorage key that hold the SF data | |
Object.keys(sessionStorage).forEach((key) => { | |
if (key.includes('namespace')) { | |
sfSessionStorage = JSON.parse(sessionStorage[key]); | |
} | |
}); |
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
Datetime.valueOfGmt(String.valueOf(Datetime.now())); |
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
Long dt1Long = DateTime.now().addDays(-1).getTime(); | |
Long dt2Long = DateTime.now().getTime(); | |
Long milliseconds = dt2Long - dt1Long; | |
Long seconds = milliseconds / 1000; | |
Long minutes = seconds / 60; | |
Long hours = minutes / 60; | |
Long days = hours / 24; |
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
for /r %d in (*) do copy "%d" "C:\Documents\PATH\TO\SOURCE" |
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
/* Allows devs to see errors that probably should be logged to the console but aren't */ | |
.auraErrorBox { | |
width: 100%; | |
} | |
.auraErrorBox > span { | |
display: flex; | |
align-items: center; | |
font-weight: 700; | |
margin-bottom: 8px; | |
} |