Skip to content

Instantly share code, notes, and snippets.

@mhamzas
Last active June 1, 2023 12:28
Show Gist options
  • Select an option

  • Save mhamzas/9c5f127f03f2c58855987753eaaa19e3 to your computer and use it in GitHub Desktop.

Select an option

Save mhamzas/9c5f127f03f2c58855987753eaaa19e3 to your computer and use it in GitHub Desktop.
Setup FSC Scratch ORG - BATCH file (Windows)
@echo off
TITLE Data Migrate for FSC
ECHO this batch file will Migrate the data from 1 org to another (FSC). Press any key to continue
PAUSE
set /p sourceOrgAlias="Enter Source Org Alias (Example: ABCScratch): "
set /p targetOrgAlias="Enter Target Org Alias (Example: XYZScratch): "
set /p jsonpath="Enter export.json Path (Example: C:\Users\USER\Documents\SFDMU_APP\data\Default): "
sfdx sfdmu:run --sourceusername %sourceOrgAlias% --targetusername %targetOrgAlias% -p %jsonpath%
{
"objects": [
{
"query": "SELECT all FROM Account",
"operation": "Upsert",
"externalId": "Name",
"excludedFields": ["CleanStatus","DunsNumber","Tradestyle","NaicsCode","NaicsDesc","YearStarted","FinServ__ClaimsOnHouseholdPolicies__c","FinServ__HouseholdPolicies__c","FinServ__InsuranceCustomerSince__c","FinServ__TotalClaimAmountPaid__c","FinServ__TotalHouseholdPremiums__c"]
},
{
"query": "SELECT all FROM Opportunity",
"operation": "Upsert",
"externalId": "AccountId",
"excludedFields": ["CampaignId","ContactId"]
},
{
"query": "SELECT all FROM ResidentialLoanApplication",
"operation": "Upsert",
"externalId": "AccountId;CJA_Mortgage__Subject_Property__c"
},
{
"query": "SELECT all FROM LoanApplicationProperty",
"operation": "Upsert",
"externalId": "LoanApplicationId"
},
{
"query": "SELECT all FROM LoanApplicantAddress",
"operation": "Upsert",
"externalId": "LoanApplicationId;LoanApplicantId"
},
{
"query": "SELECT all FROM LoanApplicantEmployment",
"operation": "Upsert",
"externalId": "LoanApplicationId;LoanApplicantId"
},
{
"query": "SELECT all FROM LoanApplicant",
"operation": "Upsert",
"externalId": "LoanApplicationId"
}
]
}
:: !/bin/bash
@echo off
TITLE FSC Scratch Org
ECHO this batch file will setup the FSC scratch org. Press any key to continue
PAUSE
set /p alias="Enter ScratchOrg Alias (Example: ABCScratch): "
:: create scratch org for 30 days with specific conf
start /wait sfdx force:org:create -f config/project-scratch-def.json -a %alias% --setdefaultusername -d 30
:: pckg installations
:: FSC
start /wait sfdx force:package:install --package 04t1E000000jb9R -w 20
:: FSC Extn
:: Has all fieldsets for Lightning pages like Financial Account tab on Account
start /wait sfdx force:package:install --package 04t1E000001Iql5 -w 20
:: FSC Extn Commercial Banking*
:: Requires more dashboards
:: sfdx force:package:install --package 04t80000000lTrZ -w 20
:: FSC Extn Retail Banking
:: sfdx force:package:install --package 04t80000000lTp4 -w 20
:: FSC Einstein Bots
:: sfdx force:package:install --package 04t80000000lTqH -w 20
:: FSC Lightning Flow Templates
start /wait sfdx force:package:install --package 04t3i000000jP1g -w 20
:: Pushing the Source
start /wait sfdx force:source:push -f
start /wait sfdx force:user:permset:assign -n FinancialServicesCloudStandard
start /wait sfdx force:user:permset:assign -n Mortgage
start /wait sfdx force:user:permset:assign -n DocumentChecklist
:: This permission set is for data load as some permissions are not assigned yet
start /wait sfdx force:user:permset:assign -n MortgageJunction_Meta
:: Generate user password
start /wait sfdx force:user:password:generate -u %alias%
:: Opening the org in browser
start /wait sfdx force:org:open
{
"orgName": "MJ Scratch",
"edition": "Partner Developer",
"features": ["Communities",
"ContactsToMultipleAccounts",
"PersonAccounts",
"IndustriesActionPlan",
"DocumentChecklist",
"FinancialServicesUser:10",
"FinancialServicesCommunityUser:10",
"FlowSites"],
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
},
"enhancedNotesSettings": {
"enableEnhancedNotes": true
},
"emailTemplateSettings": {
"enableTemplateEnhancedFolderPref": true
}
"securitySettings": {
"passwordPolicies": { }
},
"mobileSettings": {
"enableS1EncryptedStoragePref2": false
},
"communitiesSettings": {
"enableNetworksEnabled": true
}
},
"objectSettings": {
"account": {
"defaultRecordType": "PersonAccount"
}
}
}
@Tiham1

Tiham1 commented May 4, 2023

Copy link
Copy Markdown

@mhamzas Add the below statement in "[project-scratch-def.json".

{
    "settings": {
        "enhancedNotesSettings": {
            "enableEnhancedNotes": true
        }
    }
}

@mhamzas

mhamzas commented May 16, 2023

Copy link
Copy Markdown
Author

Updated. Thanks

@Tiham1

Tiham1 commented Jun 1, 2023

Copy link
Copy Markdown

@mhamzas Add the below statement in "project-scratch-def.json".

"emailTemplateSettings": { "enableTemplateEnhancedFolderPref": true }

@mhamzas

mhamzas commented Jun 1, 2023

Copy link
Copy Markdown
Author

@mhamzas Add the below statement in "project-scratch-def.json".

"emailTemplateSettings": { "enableTemplateEnhancedFolderPref": true }

Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment