Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/junjizhi/salesforce-scripts
Salesforce scratch org automation scripts.
https://github.com/junjizhi/salesforce-scripts
salesforce salesforce-developers salesforcedx
Last synced: 12 days ago
JSON representation
Salesforce scratch org automation scripts.
- Host: GitHub
- URL: https://github.com/junjizhi/salesforce-scripts
- Owner: junjizhi
- License: mit
- Created: 2020-06-23T18:30:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T01:30:26.000Z (over 2 years ago)
- Last Synced: 2024-07-11T12:22:25.257Z (4 months ago)
- Topics: salesforce, salesforce-developers, salesforcedx
- Language: Shell
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Diff two SObjects
Compare each field of the SObjects and show the differences (with the option to print all fields).
Usage:
```
diff-sobjects.sh [--show-all]
```Example:
```bash
$ ../salesforce-scripts/diff-sobjects.sh Opportunity opp-id1 opp-id2
id: opp-id1 <> opp-id2
name: opp name1 <> opp name2
createddate: 2020-07-03 15:44:17 <> 2020-07-03 15:46:53
lastmodifieddate: 2020-07-03 15:44:19 <> 2020-07-03 15:46:53
systemmodstamp: 2020-07-03 15:44:19 <> 2020-07-03 15:46:53
lastvieweddate: 2020-07-03 15:47:49 <> 2020-07-03 15:48:01
lastreferenceddate: 2020-07-03 15:47:49 <> 2020-07-03 15:48:01
```## Auto login a scratch org on a browser
This script does the same thing as `sfdx force:org:open`, but it is a good basis to build more automation on top.
### Installation
```
npm install
```If you need to create many scratch orgs, this script saves you effort to copy/paste the url / username / password to the browser.
### What it does
The script extracts the username and password from your scratch org and automatically log in on a Chromium browser.
The script is based on [Puppeteer](https://github.com/puppeteer/puppeteer).
### How to run
```
$ export SALESFORCE_REPO=/path/to/salesforce-repo
$ ./login-scratch-org.sh
```**Demo**
![sf-auto-login-demo](https://user-images.githubusercontent.com/2715151/85582315-55e22180-b60b-11ea-859c-0e70a8eefaa2.gif)