Created
February 6, 2018 15:27
-
-
Save waltonzt/fe461c43f58c26404bb0e33c49dc61f9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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<Contact> cont = new List<Contact>(); | |
| Map<String, inscor__Customer_Quote__c> cqMap = new Map<String, inscor__Customer_Quote__c>(); | |
| for (inscor__Customer_Quote__c cq : [SELECT Id, inscor__Contact__c FROM inscor__Customer_Quote__c]) { | |
| cqMap.put(cq.inscor__Contact__c, cq); | |
| } | |
| for (Contact c : [SELECT Id FROM Contact WHERE inscor__External_Reference_ID__c = null]) { | |
| if (!cqMap.containsKey(c.Id)) { | |
| cont.add(c); | |
| } | |
| } | |
| delete cont; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment