Nate Helterbrand

Import CSV Visualforce Page

salesforcevisualforce

Visualforce Page that allows ad-hoc record creation for create-able objects to the logged in users and also allows importing records from CSVs using fieldsets as the import mapping template

Deploy

Setup

Adding Permissions for Using the Import CSV Tab

  1. Navigate to Setup
  2. Search in Quick Find for Permission Sets, click the link
  3. In the Permission Sets page, click on the Import CSV Page Permissions permission set
  4. Click the Manage Assignments button
  5. Assign the Permission Set to any Users needing to see the pages.
  6. Any Users with the Permission Set can now add the Import from CSV tab to their apps or view the tab in the App Launcher

Creating Fieldsets for Objects

This section must be done in Salesforce Classic because Fieldsets are currently (as of June 2018) only editable in Salesforce Classic

  1. Switch to Salesforce Classic
  2. Navigate to Setup
  3. Navigate to the Field Sets Section
    • Standard Objects
      • Go to Setup > Customize > (Object Name) > Field Sets
    • Custom Objects
      • Go to Setup > Create
        1. Select the Object Name in the Page listing all Custom Objects
        2. Scroll down to Field Sets
  4. Name the field set and populate other required fields
  5. Drag the fields for the fieldset onto the section under the list of fields
    • Marking the Field as Required will add an asterisk to the Import CSV Page column for that field
    • The order of the fields in the fieldset determine the order of the columns in the Import CSV Page
  6. Field Sets created will be available in Step 1 on the Import CSV Page for that Object

Usage

Summary Steps

  1. Choosing the SObject and set of fields to use when inserting records
  2. Inserting records for the SObject the following ways:
    1. Loading a file with the records
    2. Adding a record to the page and populating the fields manually

Step 1 of 2: Choosing the SObject and Set of Fields

Step 1 of 2

Step 2 of 2: Inserting records for the SObject

Step 2 of 2

Additional Details