|
13 |
14 | {header}
15 |
16 | |
17 |
18 |
19 |
20 |
21 |
|---|
|
24 |
25 | {cell}
26 |
27 | |
28 |
29 |
22 |
23 |
24 | ## URL (recommended)
25 | - [Production/Developer](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t1t000003LfYEAA0)
26 | - [Sandbox](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t1t000003LfYEAA0)
27 |
28 | This approach is recommended since all components will be deployed using a namespace, removing the chance of failures due to conflicting API names.
29 |
30 | ## Unlocked package (recommended)
31 | You can install this as an Unlocked Package, using the CLI, by running the following command:
32 | ```bash
33 | sfdx force:package:install --package "04t1t000003LfYEAA0" --targetusername YOUR_ORG_ALIAS --wait 10 --publishwait 10
34 | ```
35 | This approach is recommended since all components will be deployed using a namespace, removing the chance of failures due to conflicting API names.
36 |
37 | ## Manual
38 | You can install this by cloning the repository and deploying the content of _cmd-loader_ folder. Before that you should remove the _namespace_ property in the _sfdx-project.json_ file.
39 | ```json
40 | "namespace": "spaghettiCMD"
41 | ```
42 |
43 | # User Guide
44 | After deploying the application follow these step to enable it for your users:
45 |
46 | 1. Assign yourself, or ask your System Administrator to assign, the _Custom Metadata Loader_ permission set to your user
47 | 1. In the App Launcher search for _Custom Metadata Loader_ tab
48 | 1. Select the CSV file
49 | 1. Select the Custom Metadata Type
50 | 1. Click on _Load Records_ button
51 |
52 | ## Field types supported
53 | - Checkbox
54 | - Date, the specified string should use the standard date format “yyyy-MM-dd”.
55 | - Datetime, the specified string should use the standard date format “yyyy-MM-dd HH:mm:ss” in the local time zone.
56 | - Email
57 | - Number
58 | - Percent
59 | - Phone
60 | - Picklist
61 | - Text
62 | - Text Area, supports multiline text
63 | - Text Area Long, supports multiline text
64 | - URL
65 |
66 | ## CSV columns
67 | CSV columns must match the API name on your Custom Metadata Type fields. The CSV file must include these columns:
68 | - _DeveloperName_, is the unique identifier for the record
69 | - One between _MasterLabel_ or _Label_, for the record's label
70 |
71 | ## Limitations
72 | This application does not impose any hard limit on the CSV file size or number of rows but it is subjected to all [Apex Governor Limit](https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm).
73 |
74 | If your CSV file contains more than 250 rows the application will automatically split it into smaller chunks of 250 rows each. Chunks will be loaded sequentially.
75 |
76 | For more complex use cases consider that the [Salesforce CLI](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm) has a bunch of commands to work with Custom Metadata Types. Check them out [here](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_cmdt.htm#cli_reference_force_cmdt).
77 |
78 | # Demo
79 | YouTube video:
80 |
81 | [](https://www.youtube.com/watch?v=abYr7B-5vsA)
82 |
83 | # Contribute
84 | If you are interested in contributing, please take a look at the [CONTRIBUTING](CONTRIBUTING.md) guide.
85 |
86 | # Credits
87 | - [Papa Parse](https://www.papaparse.com/) for its amazing Javascript CSV parser
--------------------------------------------------------------------------------
/tests/testPkg/objects/My_Custom_Metadata_Type__mdt.object:
--------------------------------------------------------------------------------
1 |
2 |