Skip to content

Commit

Permalink
Correct typo and add headings to job-snippets.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DrCord committed Aug 23, 2024
1 parent 790b950 commit fbdc274
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/jobs/job-snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Most snippets are implemented as callbacks to other operations.

You can copy these callbacks and adapt them to suit your own code.

## General

### Custom replacer

```js
Expand All @@ -24,7 +26,7 @@ This will replace all "cats" with "dogs" in the string that lives at
> **NOTE:** The JavaScript `replace()` function only replaces the first instance
> of whatever argument you specify. If you're looking for a way to replace all
> instances, we suggest you use a regex like we did in the
> [example](#custom-concatenation-of-null-values) below.
> [example](#concatenation-of-null-values) below.
### Custom arrayToString

Expand Down Expand Up @@ -84,6 +86,8 @@ See how instead of taking the id of the "last" thing that was created in
Salesforce, you're taking the id of the 1st thing, or 2nd thing if you replace
"length-1" with "length-2".

## Salesforce

### Convert date string to standard ISO date for Salesforce

```js
Expand All @@ -108,7 +112,7 @@ array.map(item => {
});
```

### Bulk upsert with an external ID in salesforce
### Bulk upsert with an external ID in Salesforce

```js
bulk(
Expand Down

0 comments on commit fbdc274

Please sign in to comment.