-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for custom field mappings (#664)
* Added the ability to set & map custom fields, using a new CMDT LoggerFieldMapping__mdt and new LogEntryEventBuilder instance method overloads setField(Schema.SObjectField field, Object fieldValue) and setField(Map<Schema.SObjectField, Object> fieldToValue) * Added some CMDT records to the extra-tests directory that map the included custom fields (also stored in the extra-tests directory). These CMDT records are just to help with functionally/manually testing in a scratch org - they won't be included in any of the packages * Scope creep: Updated several config classes to consistently have test-visible private methods before non-test-visible private methods * Updated README.md to add details about custom field mappings, and cleaned up/updated some other README contents * Added .github/FUNDING.yml so the repo has a sponsor button
- Loading branch information
Showing
43 changed files
with
1,093 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [jongpie] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
## LoggerFieldMapper class | ||
|
||
Maps fields values from custom fields on `LogEntryEvent__e` to equivalent fields on `Log__c`, `LogEntry__c`, and `LoggerScenario__c` | ||
|
||
--- | ||
|
||
### Methods | ||
|
||
#### `mapFieldValues(SObject sourceRecord, SObject targetRecord)` → `void` | ||
|
||
Copies field values from the `sourceRecord` to the `targetRecord`, based on rules configured in `LoggerFieldMapping_t` | ||
|
||
##### Parameters | ||
|
||
| Param | Description | | ||
| -------------- | ------------------------------------------------------------------------------- | | ||
| `sourceRecord` | The source `SObject` record containing the data to copy | | ||
| `targetRecord` | The target `SObject` record that should have fields & field values appended | | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.