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
String prefix = 'cte'; | |
// Get gift transactions | |
List<GiftTransaction> lstGT = [SELECT Id FROM GiftTransaction WHERE md_npc_pack__Platform_Key__c LIKE :prefix + '%']; | |
System.Debug(lstGT); | |
// Delete installments associated with Gift Transasctions | |
List<cpm__Installment__c> lstI = [SELECT Id FROM cpm__Installment__c WHERE fdff__GiftTransaction__c IN :lstGT]; | |
System.Debug(lstI); | |
if (lstI.size() > 0) delete lstI; |
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
# https://salesforce.stackexchange.com/questions/275679/remove-all-old-flow-versions-using-sfdx | |
sfdx force:data:soql:query --query "SELECT Id FROM Flow WHERE Status = 'Obsolete'" --target-org $1 --use-tooling-api --result-format csv > flowTodelete.csv | |
while read c; do | |
if [[ "$c" != "Id" && "$c" != "Your query returned no results." ]] | |
then | |
sfdx force:data:record:delete --sobject Flow --record-id $c --target-org $1 --use-tooling-api | |
fi | |
done < flowTodelete.csv |
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
// Set lead Id here. | |
Id leadId = '00Q8t0000024px3EAA'; | |
LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1]; | |
String leadStatus = convertStatus.MasterLabel; | |
// Execute Salesforce' lead convert service | |
Database.LeadConvert lc = new Database.LeadConvert(); | |
lc.setLeadId(leadId); | |
lc.setConvertedStatus(leadStatus); |
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
sfdx alias set [email protected] | |
sfdx force auth web login -a abc_production | |
sfdx alias set [email protected] | |
sfdx force auth web login -a xyz_sandbox -r https://xyzfoundation--movedata.sandbox.my.salesforce.com | |
sfdx force:mdapi:retrieve -k package.xml -s -r . -u abc_production | |
unzip ./unpackaged.zip -d ./unpackaged | |
sfdx force:mdapi:deploy -d ./unpackaged -w 10 -u xyz_sandbox |
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
DATE( | |
VALUE(RIGHT({!InvoiceDate}, 4)), | |
VALUE( | |
MID( | |
{!InvoiceDate}, | |
FIND("/", {!InvoiceDate}) + 1, | |
FIND("/", {!InvoiceDate}, (FIND("/", {!InvoiceDate}) + 1)) - FIND("/", {!InvoiceDate}) - 1 | |
) | |
), | |
VALUE(LEFT({!InvoiceDate}, FIND("/", {!InvoiceDate}) - 1)) |
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
# ---------------------------------------------------------------------------------------------------- | |
# SFDX Deploy | |
# ---------------------------------------------------------------------------------------------------- | |
parameters: | |
pool: {} | |
jobs: | |
- deployment: sfdx_deploy | |
displayName: SFDX Deploy |
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
delete [SELECT Id FROM Opportunity LIMIT 2000]; | |
delete [SELECT Id FROM npe03__Recurring_Donation__c LIMIT 2000]; | |
delete [SELECT Id FROM Case LIMIT 2000]; | |
delete [SELECT Id FROM Contact LIMIT 2000]; | |
delete [SELECT Id FROM Account LIMIT 2000]; | |
delete [SELECT Id FROM md_npsp_pack__Platform_Key__c LIMIT 2000]; | |
delete [SELECT Id FROM md_forms_pack__Contact_Platform_Key__c LIMIT 2000]; | |
delete [SELECT Id FROM md_forms_pack__Account_Platform_Key__c LIMIT 2000]; | |
delete [SELECT Id FROM Campaign LIMIT 2000]; | |
delete [SELECT Id FROM md_npsp_pack__Question_Response__c LIMIT 2000]; |
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
Rule Name: MoveData Contact Duplicate | |
Rule Order: 3 of 3 | |
Object: Contact | |
Record-Level Security: Enforce sharing rules | |
Action On Create: Allow | |
Operations On Create: Alert / Report | |
Action On Edit: Allow | |
Operations On Edit: Alert / Report | |
Alert Text: Use one of these records? | |
Active; Checked |
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
resource "aws_api_gateway_method" "graphRoot" { | |
rest_api_id = aws_api_gateway_rest_api.api.id | |
resource_id = aws_api_gateway_resource.graphRoot.id | |
http_method = "POST" | |
authorization = "COGNITO_USER_POOLS" | |
authorizer_id = aws_api_gateway_authorizer.cognito.id | |
} | |
resource "aws_api_gateway_integration" "graphRoot" { | |
rest_api_id = aws_api_gateway_rest_api.api.id |
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 GraphBuilder { | |
/* | |
EXAMPLE | |
------- | |
String q = new GraphBuilder.QueryOperation( | |
new GraphBuilder.QueryResolver( | |
'notification', |
NewerOlder