Object Creation - The Military Speed-Up Method
As a Salesforce professional, you are aware of the method of creating a new object via the Object Manager. Be it in Classic or Lightning, most of the new applications developed in Salesforce have been done using the trusty method of (i) creating the new Object and (ii) building the fields and finally, the layout. The other option is by utilizing Schema Builder to complete your new (or existing) Objects in a visual format applicable to more complex models. In addition to these options, a third, and lesser-known alternative is available which is custom-tailored when the need for speed is of the utmost importance. Further, if the specifics of your new object have been designed in Google Sheets, Excel or CSV, the process of creating your object is a simple process, similar to importing data into an object via the Data Loader. The first step in the process is to ensure that your field-structure has been completed in your spreadsheet with the same rules applying when creating the field individually via the standard method. This means paying particular attention to ensuring that your fields have been formatted correctly before importing into Salesforce. Of course, you do have the option to go through this manually if the format is not as per the Salesforce import rules, however, much time can be saved in considering these issues ahead of time by recognizing the following:
Date Fields: Be sure to use the standard format for inserting date information (MM/DD/YYYY) as incorrectly formatted dates will not be accepted . More info on accepted formats Picklist Fields: When defining the option list within your PL / MSPL fields, take caution to only load in the values which are required / needed within the field, as well as spellchecking each value. Lookup Fields: As Object or User lookups are best utilized via their native ID, be sure to export this data from a report before committing it to your source file. While some options exist to use Text Names, just remember that there are a multitude of ways to spell 'John Smith', which can cause issues. Using a unique identifier via the referring ID will ensure your record is associated with the right lookup entity as the utility will recognize the Prefix of the Object's ID. Currency Fields: While the end-user's layout will show the full values, separate by comma and the native/converted currency (Dollars, Euro, etc.) the format required for import will have these characters eliminated. So, if the original value is $64,250, be sure to use 64250 as the compliant format. Email Fields: The neat thing about all spreadsheet formats is the ability to quickly search/replace records, of which this function is custom-tailored to looking for email fields. You can also utilize a formula to quickly ensure that all of your records which contain an email have an '@' symbol followed by a '.'
Once all of your values have been worked out and your Data Load source file is ready (and de-duplicated), you are now ready to load it into Salesforce. Simply go to the Object Manager in Setup, and select the Create button and choose the 'Custom Object From Spreadsheet' option, which presents you with 3 source options: (i) CSV/Excel File, (ii) Google Sheets, or (iii) Office365/Drive. Once your option is selected, and your file has been chosen, you will then be presented with a utility to define your Object / Fields. These options include choosing the Encoding Format (i.e. UTF8), the Separator option for fields such as Picklists (comma, semicolon, tab), Field Label Source (auto-match or manual), and selection of the Record Name (either by a Field you defined in your source file or by an auto-create Record Name by Salesforce).
Once these options have been defined, you then choose the Field Types (i.e. Text, Currency, Picklist, etc.) to match-up to your Field Names defined in your source file and determination whether or not to include them in the Page Layout once created. Once this has been done, click the 'Next' button to finalize your import by defining the Object Name (singular and plural) and Description. Like the traditional method of Object creation, optional items such as 'Allow Search', 'Allow Reports' and 'Add Notes' are also provided as options prior to loading your data, and once this has been completed, click 'Finish' to import your file and create your new Object, Fields (and data, if you chose this option). That's all there is to it... you can now search for your new Object in the App Launcher, or from the Object Manager, and begin creating new records, or reconcile the data you loaded in via the Object's List or by creating a Report. Ongoing, maintaining your new Object can be done in the standard way via the Object Manager (i.e. creating new fields or modifying existing ones). Also be sure that while this utility is lightning fast for creating new Objects (and importing of data in the same step), you also want to be cognizant of security considerations like FLS, Accessibility and other elements of data stewardship. While this method of creating new Custom Objects may not suit every situation, for times when a rapid deployment is the order of the day, nothing beats a streamlined approach using a spreadsheet, so why not give it the 'ol 'College Try' today by spinning up a sample object in your Sandbox or Dev environment. Once you recognize the speed-of-execution of this utility for yourself, you may decide to include it as part of your team's go-to development procedures for future projects.
__________________________________________________________________________________________ Title image by Honeywell Aerospace | Data-Loader by Mulesoft/Salesforce















