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
| global class InvalidContactEmailsBatch implements Database.Batchable<sObject> { | |
| global Database.QueryLocator start(Database.BatchableContext BC) { | |
| String invalidEmail = '%.invalid'; | |
| return Database.getQueryLocator('SELECT Id, Email FROM Contact WHERE Email != null AND (NOT Email LIKE :invalidEmail)'); | |
| } | |
| global void execute(Database.BatchableContext BC, List<Contact> contacts) { | |
| for (Contact contact : contacts) { | |
| contact.Email += '.invalid'; | |
| } |
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
| public class UpdateContactPrimaryAffiliationBatch implements Database.Batchable<SObject> { | |
| public void execute(Database.BatchableContext param1, List<Contact> contactsList) { | |
| for (Contact contactVar : contactsList) { | |
| contactVar.npsp__Primary_Affiliation__c = contactVar.AccountId; | |
| contactVar.AccountId = null; | |
| } | |
| update contactsList; | |
| List<Contact> updatedContactList = [ |
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
| asdasd | |
| asd | |
| a | |
| sda | |
| sd | |
| asd | |
| as | |
| d | |
| asd |
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
| echo -n "this is secret" | openssl enc -e -aes-256-cbc -a -k "123" -md sha256 | |
| echo "U2FsdGVkX18GfDjxZTCJmfLlnxe3jEQMQloKtWiJ5xU="|openssl base64 -d|openssl enc -d -aes-256-cbc -k "123" -md sha256 |
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<npsp_plus__Vertic_Async_Process__c> vaps = [SELECT Id FROM npsp_plus__Vertic_Async_Process__c WHERE npsp_plus__Status__c = 'Failed']; | |
| for(npsp_plus__Vertic_Async_Process__c vap: vaps){ | |
| vap.npsp_plus__Status__c = 'Retrying'; | |
| vap.npsp_plus__Autorun__c = false; | |
| } | |
| update vaps; | |
| npsp_plus.vertic_AsyncProcessBatch.run(new List<Id>(new Map<Id, SObject>(vaps).keySet())); | |
| // Track the progress. | |
| //SELECT npsp_plus__Status__c, COUNT(Id) FROM npsp_plus__Vertic_Async_Process__c GROUP BY npsp_plus__Status__c |
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
| function initElements() { | |
| var stripe = Stripe('pk_test_18DZ3gJCF1Raph6cLhnMBjLx009D9fcNNh'); | |
| var elements = stripe.elements(); | |
| var style = { | |
| base: { | |
| color: '#32325d', | |
| fontFamily: '"Helvetica Neue", Helvetica, sans-serif', | |
| fontSmoothing: 'antialiased', | |
| fontSize: '16px', |
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
| insert new EmailTemplate( | |
| FolderId = UserInfo.getOrganizationId(), | |
| Name = 'One-Off Donation Confirmation (NPSP+)', | |
| IsActive = true, | |
| UIType = 'SFX', | |
| DeveloperName = 'npsp_plus_One_Off_Donation_Confirmation', | |
| TemplateType = 'custom', | |
| Subject = 'Donation Confirmation', | |
| HTMLValue = '<html> <head> <title></title> </head> <body style="height: auto; min-height: auto;"> <meta /> <span style="font-family:Arial,Helvetica,sans-serif;">Dear {{{Recipient.FirstName}}},<br /> <br /> Thank you for your support. Please confirm your donation payment using this link: <a href="{{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}" target="blank">Donate</a><br /> <br /> Please contact us if you have any question.<br /> <br /> Thank you,<br /> NPSP+</span> <hr /> <img src="https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl={{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}&choe=UTF-8" /> </body></html>', | |
| RelatedEntityType = 'npsp_plus__Form_Sub |
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
| insert new EmailTemplate( | |
| FolderId = UserInfo.getOrganizationId(), | |
| Name = 'One-Off Donation Confirmation (NPSP+)', | |
| IsActive = true, | |
| UIType = 'SFX', | |
| DeveloperName = 'npsp_plus_One_Off_Donation_Confirmation', | |
| TemplateType = 'custom', | |
| Subject = 'Donation Confirmation', | |
| HTMLValue = '<html> <head> <title></title> </head> <body style="height: auto; min-height: auto;"> <meta /> <span style="font-family:Arial,Helvetica,sans-serif;">Dear {{{Recipient.FirstName}}},<br /> <br /> Thank you for your support. Please confirm your donation payment using this link: <a href="{{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}" target="blank">Donate</a><br /> <br /> Please contact us if you have any question.<br /> <br /> Thank you,<br /> NPSP+</span> <hr /> <img src="https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl={{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}&choe=UTF-8" /> </body></html>', | |
| RelatedEntityType = 'npsp_plus__Form_Sub |
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
| insert new EmailTemplate( | |
| FolderId = UserInfo.getOrganizationId(), | |
| Name = 'One-Off Donation Confirmation (NPSP+)', | |
| IsActive = true, | |
| UIType = 'SFX', | |
| DeveloperName = 'npsp_plus_One_Off_Donation_Confirmation', | |
| TemplateType = 'custom', | |
| Subject = 'Donation Confirmation', | |
| HTMLValue = '<html> <head> <title></title> </head> <body style="height: auto; min-height: auto;"> <meta /> <span style="font-family:Arial,Helvetica,sans-serif;">Dear {{{Recipient.FirstName}}},<br /> <br /> Thank you for your support. Please confirm your donation payment using this link: <a href="{{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}" target="blank">Donate</a><br /> <br /> Please contact us if you have any question.<br /> <br /> Thank you,<br /> NPSP+</span> <hr /> <img src="https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl={{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}&choe=UTF-8" /> </body></html>', | |
| RelatedEntityType = 'npsp_plus__Form_Sub |
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
| insert new EmailTemplate( | |
| FolderId = UserInfo.getOrganizationId(), | |
| Name = 'One-Off Donation Confirmation (NPSP+)', | |
| IsActive = true, | |
| UIType = 'SFX', | |
| DeveloperName = 'npsp_plus_One_Off_Donation_Confirmation', | |
| TemplateType = 'custom', | |
| Subject = 'Donation Confirmation', | |
| HTMLValue = '<html> <head> <title></title> </head> <body style="height: auto; min-height: auto;"> <meta /> <span style="font-family:Arial,Helvetica,sans-serif;">Dear {{{Recipient.FirstName}}},<br /> <br /> Thank you for your support. Please confirm your donation payment using this link: <a href="{{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}" target="blank">Donate</a><br /> <br /> Please contact us if you have any question.<br /> <br /> Thank you,<br /> NPSP+</span> <hr /> <img src="https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl={{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}&choe=UTF-8" /> </body></html>', | |
| RelatedEntityType = 'npsp_plus__Form_Sub |
NewerOlder