Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Energy & Utilities Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Set Up Optional Sample Data for Contractor Portal

          Set Up Optional Sample Data for Contractor Portal

          To test the features of Contractor Portal with test data, you can deploy this sample data to your org.

          While you can set up sample data in your production org if you wish, consider adding the sample data to a sandbox instead.

          The Contractor Portal sample data is available as downloadable files. To download and then deploy the data to your target org, follow these instructions:

          1. Add sample images.
            1. To upload images to the Salesforce Files section in your org from the file EnergyCPImages.zip, from the App Launcher, click Files, and then click Upload Files.
            2. Enter the image name. For products, use the product code as the image name. For programs, use the program name without the special characters and spaces as the image name.
            3. For every uploaded image, from the dropdown.
              Enable Customer Access for each image.
            4. Click Share, then under Who Can Access, turn on Customer Access, turn off Expiration date, and then click Done.
          2. Download these apex class files to your computer: EUProgramSampleData and EUProgramCreateSampleData.
          3. Create new Apex Classes.
            1. Go to Setup.
            2. In the Quick Find box, search for Apex Classes, then click Apex Classes.
            3. Click New.
            4. Copy the code from the CLS file on your system and paste it in the Apex Class window.
            5. Click Save.
            6. Enter the filename of the CLS file as the name of the new Apex Class.
          4. Open an anonymous window in developer console.
            1. Click Setup, then click Developer Console.
            2. In the Developer Console, click Debug, then click Open Execute Anonymous Window.
          5. Paste the code snippet in the anonymous window: EUProgramCreateSampleData.createRecords();.
          6. Click Execute.
          7. Delete the EUProgramSampleData and EUProgramCreateSampleData classes.
            1. Go to Setup.
            2. In the Quick Find box, search for Apex Classes, then click Apex Classes.
            3. Delete the classes that you created from the Apex Classes list.
              You must delete the classes in reverse order of creation.
          8. (Optional) Activate picklist values of the Product Family field in the Product2 object. See Add or Edit Picklist Values.
          9. Assign a business license to an account.
            1. From the App Launcher, find and select Business Licenses.
            2. Click New.
            3. In New Business License, enter the details of a business license and associate it with the account of your choice.
              For example, enter the name of the license, select the current date for Period Start, select any future date for Period End, enter the identifier for the license, select the account, and select IsActive.
            4. Save your changes.
          10. Add a role to the contact.
            1. Open the Developer console. See Developer Console.
            2. Run this query:
              select id, <AccountID>, <ContactID>, roles from AccountContactRelation
              where AccountID is the account for which you want to set ContactID as primary.
           
          Loading
          Salesforce Help | Article