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
| //Run the below query to see what access Profiles('System Administrator','Standard User') are giving to objects('Lead','Account') | |
| SELECT sobjecttype, | |
| Parent.Profile.Name, | |
| permissionscreate, | |
| permissionsdelete, | |
| permissionsviewallrecords, | |
| permissionsmodifyallrecords, | |
| permissionsread, | |
| permissionsedit |
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
| #!/bin/bash | |
| TARGET_ORG=$1 | |
| if [$TARGET_ORG == ""]; then | |
| echo Please specify a target username | |
| echo For a list of available usernames use: sfdx force:org:list | |
| exit 1 | |
| fi |
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
| deleteDebugLogs(){ | |
| sfdx force:data:soql:query -q "SELECT Id FROM ApexLog" -r "csv" > out.csv && sfdx force:data:bulk:delete -s ApexLog -f out.csv | |
| } | |
| extendRameshaDevTraceFlagBy24Hours() { | |
| StartDate=$(date -u +%Y-%m-%dT%H:%M:%S.000+0000) | |
| ExpirationDate=$(date -u -v+24H +%Y-%m-%dT%H:%M:%S.000+0000) | |
| #echo "StartDate=$StartDate ExpirationDate=$ExpirationDate" | |
| temp="StartDate=$StartDate ExpirationDate=$ExpirationDate" | |
| sfdx force:data:record:update -t -s TraceFlag -i 7tfM0000000Dd3R -v $temp |
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
| #!/bin/bash | |
| sfdx force:apex:log:list --targetusername=devsandbox --json | jq '.result[] | .Id' > apexlogids.csv | |
| input="apexlogids.csv" | |
| while IFS= read -r line | |
| do | |
| id="${line//\"/}" | |
| echo "$id" | |
| sfdx force:apex:log:get --logid="$id" --targetusername="devsandbox" > $id.log | |
| done < "$input" |
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
| #!/bin/bash | |
| input="flows.csv" | |
| while IFS= read -r line | |
| do | |
| id="${line//\"/}" | |
| id="'$id'" | |
| echo "$id" | |
| sfdx force:data:soql:query --usetoolingapi --query="SELECT Id,FullName FROM Flow WHERE Id=$id" --resultformat=csv --targetusername=prod >> flow_names.csv | |
| done < "$input" |
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
| #Deletes apex logs. | |
| sudo find / -type f -name '07L*.log' -exec rm -i {} \; | |
| sudo find / -type f -name 'success*.csv' -exec rm -v {} \; |
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
| #!/bin/bash | |
| extensionsToExclude=( | |
| 'History' | |
| '__History' | |
| 'Share' | |
| '__Share' | |
| 'ChangeEvent' | |
| '__ChangeEvent' | |
| ) | |
| input="ObjNames.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
| #!/bin/bash | |
| sfdx force:mdapi:listmetadata --metadatatype=CustomObject --targetusername=sandbox --json | jq '.result[].fullName' > temp.txt | |
| input="temp.txt" | |
| rm -f package_temp.xml | |
| echo "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n" >> package_temp.xml | |
| echo "<Package xmlns=\"http://soap.sforce.com/2006/04/metadata\">" >> package_temp.xml | |
| echo " <types>" >> package_temp.xml | |
| while IFS= read -r line | |
| do | |
| objName="${line//\"/}" |
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
| #!/bin/bash | |
| sfdx force:mdapi:listmetadata --metadatatype=EmailFolder --targetusername=devcrm --json | jq '.result[].fullName' > temp.txt | |
| input="temp.txt" | |
| rm -f package_temp.xml | |
| echo "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n" >> package_temp.xml | |
| echo "<Package xmlns=\"http://soap.sforce.com/2006/04/metadata\">" >> package_temp.xml | |
| echo " <types>" >> package_temp.xml | |
| while IFS= read -r line | |
| do | |
| folderName="${line//\"/}" |
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
| #!/bin/bash | |
| prepare_wildcard_package (){ | |
| echo " <types>" >> package_temp.xml | |
| echo " <members>*</members>" >> package_temp.xml | |
| echo " <name>$1</name>" >> package_temp.xml | |
| echo " </types>" >> package_temp.xml | |
| } | |
| rm -f temp.txt |