Skip to main content


Showing posts from April, 2019

DIY Salesforce partial copy sandbox using DumpIT

Salesforce partial copy sandboxes are expensive, but it's possible to approximate one if you're willing to spend a little time moving the data around yourself with a fantastic little tool called DumpIT, which you can get from here. Big thanks to Gulshan Middha for all his work on it!

Below are the steps I had to go through to get all my data imported. Please let me know if you have any suggestions that could make this easier or more effective!

Make a new development sandbox and log into itDelete all outbound messages and workflows that relate to integrations with external systemsAdd a "Dump Id" field to the "User" object, as DumpIT doesn't seem to do this automatically. It's a text field named Dump_Id, length 18, and is a unique, case-sensitive, external IDDecide which object types you want to migrate and add them to process.objects in DumpIT's fileDeactivate validation rules and lookup filters for those objects (TODO: write a…

Useful Azure AD Powershell snippets

Don't forget to Connect-AzureAD first (like I always do!)

Get extension properties of a user (e.g. created date)

Get-AzureADUser -SearchString 'username or email addy' | select -ExpandProperty ExtensionProperty

Get guest users that are not members of a specified group

$allGuests = Get-AzureADUser -Filter "usertype eq 'guest'" -All $true
$groupMembers = Get-AzureADGroup -SearchString 'group-name' | Get-AzureADGroupMember -All $true
$allGuests | where {$groupMembers -notcontains $_ }

Get details and creators of all Salesforce reports that reference a specified field

If you're ever modifying a Salesforce field and you want to contact everyone who has created reports using the field, here's how you do that using Powershell and the CLI (which you can also install via chocolatey):

set-location C:\wherever
force export
$reportFiles = get-childitem -Path .\src\reports\ -Recurse | sls "field_to_search_for"

# I've included some extra fields here, they might come in useful
$reportData = force query --format=json "select id,,, developername, name, foldername, isdeleted, lastrundate, lastvieweddate from report" | convertfrom-json
$matchingReports = $reportData | where { $reportFiles.Filename -eq $_.DeveloperName + ".report" }

$matchingReports | % { $ + ' created report "' + $ +'"' }
# send an email to these folks: $ | select -Unique

Salesforce bulk data load job fails with message "InvalidBatch : Field name not found : Id"

After creating a bulk / batch job, I'll sometimes see that it failed before even starting (failed batches:1, but with 0 records failed), with the following error:

InvalidBatch : Field name not found : Id

Annoyingly, this is caused by the inability of the Salesforce bulk import process to handle anything but ASCII.  Try saving your CSV again, making sure it's in ASCII (called "CSV (Comma delimited)" in Excel) and not using UTF-8 or some other encoding.  No idea how you're supposed to insert that new contact named José, though...