Implement innovative two-character option scheme
- Replace single-character options with memorable two-character alternatives - Based on syllable mapping: -to (target-org), -qy (query), -fm (format), etc. - Updated all bash and PowerShell scripts with consistent options - Added comprehensive documentation and examples to README.md - Maintains backward compatibility with long options - More intuitive and self-documenting than traditional CLI options
This commit is contained in:
@@ -9,43 +9,43 @@
|
||||
to Salesforce orgs with CSV/JSON support, upsert operations, and intelligent validation.
|
||||
|
||||
.PARAMETER File
|
||||
CSV or JSON file to import
|
||||
CSV or JSON file to import (alias: -fl)
|
||||
|
||||
.PARAMETER SObject
|
||||
Target sObject type
|
||||
Target sObject type (alias: -so)
|
||||
|
||||
.PARAMETER Operation
|
||||
Operation: insert, update, upsert (default: insert)
|
||||
Operation: insert, update, upsert (default: insert) (alias: -op)
|
||||
|
||||
.PARAMETER ExternalId
|
||||
External ID field for upsert/update operations
|
||||
External ID field for upsert/update operations (alias: -ei)
|
||||
|
||||
.PARAMETER TargetOrg
|
||||
Target org username or alias
|
||||
Target org username or alias (alias: -to)
|
||||
|
||||
.PARAMETER Bulk
|
||||
Use bulk API for large datasets
|
||||
Use bulk API for large datasets (alias: -bk)
|
||||
|
||||
.PARAMETER Wait
|
||||
Wait time in minutes (default: 10)
|
||||
Wait time in minutes (default: 10) (alias: -wt)
|
||||
|
||||
.PARAMETER BatchSize
|
||||
Batch size for bulk operations (default: 10000)
|
||||
Batch size for bulk operations (default: 10000) (alias: -bs)
|
||||
|
||||
.PARAMETER IgnoreErrors
|
||||
Continue on errors (don't fail entire job)
|
||||
Continue on errors (don't fail entire job) (alias: -ie)
|
||||
|
||||
.PARAMETER Verbose
|
||||
Enable verbose output
|
||||
Enable verbose output (alias: -vb)
|
||||
|
||||
.PARAMETER Help
|
||||
Show this help message
|
||||
Show this help message (alias: -hp)
|
||||
|
||||
.EXAMPLE
|
||||
.\sf-data-import.ps1 -File accounts.csv -SObject Account
|
||||
.\sf-data-import.ps1 -File contacts.json -SObject Contact -Operation upsert -ExternalId Email
|
||||
.\sf-data-import.ps1 -File leads.csv -SObject Lead -Bulk -BatchSize 5000
|
||||
.\sf-data-import.ps1 -File updates.csv -SObject Account -Operation update -ExternalId AccountNumber
|
||||
.\sf-data-import.ps1 -fl accounts.csv -so Account
|
||||
.\sf-data-import.ps1 -fl contacts.json -so Contact -op upsert -ei Email
|
||||
.\sf-data-import.ps1 -fl leads.csv -so Lead -bk -bs 5000
|
||||
.\sf-data-import.ps1 -fl updates.csv -so Account -op update -ei AccountNumber
|
||||
|
||||
.NOTES
|
||||
This script automatically checks for Salesforce CLI installation and runs
|
||||
@@ -58,21 +58,39 @@
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[Alias("fl")]
|
||||
[string]$File,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[Alias("so")]
|
||||
[string]$SObject,
|
||||
|
||||
[ValidateSet("insert", "update", "upsert")]
|
||||
[Alias("op")]
|
||||
[string]$Operation = "insert",
|
||||
|
||||
[Alias("ei")]
|
||||
[string]$ExternalId,
|
||||
|
||||
[Alias("to")]
|
||||
[string]$TargetOrg,
|
||||
|
||||
[Alias("bk")]
|
||||
[switch]$Bulk,
|
||||
|
||||
[Alias("wt")]
|
||||
[int]$Wait = 10,
|
||||
|
||||
[Alias("bs")]
|
||||
[int]$BatchSize = 10000,
|
||||
|
||||
[Alias("ie")]
|
||||
[switch]$IgnoreErrors,
|
||||
|
||||
[Alias("vb")]
|
||||
[switch]$Verbose,
|
||||
|
||||
[Alias("hp")]
|
||||
[switch]$Help
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user