Skip to content

Instantly share code, notes, and snippets.

// Must disable validation rule on Opportunity: Primary_Partner_Account_Must_Have_Role first
Opportunity[] allboundOpps = [SELECT Id FROM Opportunity WHERE Allbound_ID__c != null AND LastModifiedDate != TODAY LIMIT 50];
System.debug('allboundOpps.size(): ' + allboundOpps.size());
update allboundOpps;
@dp3000
dp3000 / scramble-emails.md
Last active July 12, 2024 22:57
VS Code Find and Replace Email using RegEx to Invalidate

Custom Labels

  • Find: (\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)
  • Replace: $1.invalid

Workflows

  • Find: <ccEmails>(\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)</ccEmails>
  • Replace: <ccEmails>$1.invalid</ccEmails>
  • Files to Include: force-app/main/default/workflows/
@dp3000
dp3000 / 0.2.1-boggle_class_from_methods.rb
Last active January 1, 2016 03:58 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
def create_word(board, *coords)
coords.map { |coord| board[coord.first][coord.last]}.join("")
end
def get_row(board, row)
board[row]
end