Created
July 14, 2017 13:57
-
-
Save mattparlane/1f443da72e64236b941799b194833194 to your computer and use it in GitHub Desktop.
Set all contacts with non-Household accounts to Household accounts
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
Contact[] contacts = [select Id, AccountId from Contact where Account.RecordType.DeveloperName != 'HH_Account']; | |
for (Contact contact : contacts) | |
contact.AccountId = null; | |
update contacts; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment