Skip to content

Commit

Permalink
Merge pull request #52 from iamber12/main
Browse files Browse the repository at this point in the history
chore: Update documentation to clarify relationship queries
  • Loading branch information
k-capehart authored Jul 1, 2024
2 parents 2abc9b6 + fce76a9 commit b8f7201
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,29 @@ if err != nil {
}
```

### Handling Relationship Queries

When querying Salesforce objects, it's common to access fields that are related through parent-child or lookup relationships. For instance, querying `Account.Name` with related `Contact` might look like this:

##### Example SOQL Query
```sql
SELECT Id, Account.Name FROM Contact
```

#### Corresponding Go Structs
To effectively handle the data returned by this query, define your Go structs as follows:

```go
type ContentDocumentLink struct {
Id string
Account Account
}

type Account struct {
Name string
}
```

## SObject Single Record Operations

Insert, Update, Upsert, or Delete one record at a time
Expand Down

0 comments on commit b8f7201

Please sign in to comment.