AdvoLogix Help

Invoking an Intake Form for Data Entry

Updated

Intake forms may be completed by internal staff, community users, or external users (through Sites pages). The options described below support a wide variety of use cases ranging from new client intake to corporate legal service requests.

1. Options for Invoking Intake Forms

1.1. The Intake Launcher Lightning Component

The Intake Form Launcher is a lightning component capable of being docked on the home page, the application utility bar, or a lightning application page.

Please see this article for more information on the intake launcher component. 

1.2. The Intake Form Launch Button

Each intake form's record page has a Launch Form button, allowing users to invoke the underlying intake form for data entry.

1.3. The Intake Form Launcher API

The intake launcher API allows organizations to launch the intake form in  a variety of ways. Various API options allows organizations a wide range of behavior and run-time form control.

Please see this article for more information on the intake API. 

2. Use Cases

Internal Users

The most common method for launching an intake for an internal user would be the intake launcher lightning component. 

Community Users

The most common method for invoking an intake form for community users is via the intake launcher API.

Sites Users

Sites users are unauthenticated therefore organizations must ensure appropriate access to the underlying data within the forms has been established for the Site's "running as" user.

Setting up a Force.com Site for Intake

STEP 1: Prepare Permission Set for Sites Guest User Access

As a user generating intake requests from Force.com Sites the Sites Guest User must have the Read permission enabled for the following custom objects:

  • Global Settings
  • Intake Forms
  • Intake Elements

Any other standard or custom objects must be identified and given Read and/or Create permissions as necessary. These objects can be identified within the intake form that is to be hosted within the Force.com Site. All objects and fields used within the intake form must be given Read and Create permission.

STEP 2: Assign the Permission Set to the Sites Guest User
  • Go to the Salesforce Setup | User Interface | Sites and Domains | Sites.
  • Click on the Site Label to open the site in detail view.
  • Click on the Public Access Settings button to open the profile for the guest user associated with the Force.com Sites.
  • Click on the View Users button on the profile detail view page that just opened.
  • On the page that just opened, click on the user's full name to open the detail view of the Force.com Sites guest user.
  • Scroll down to the Permission Set Assignments related list on the user detail page.
  • Click on the Edit button and select the permission set that has been created in STEP 1 above and click Save.
STEP 3: Configure the Sharing Settings to grant access to data to Sites Guest User

We must add Guest User Sharing Rules for all the standard and custom objects that have been enabled access for the sites guest user, under STEP 1 and STEP 2 above. Configure the sharing rules using conditions that best suit your implementation requirements for the intake form request generation.

The access to data records is necessary because as soon as an intake request is submitted from the Force.com Sites the newly generated records will have the record owner changed to an internal user from the organization.  This happens because a sites guest user cannot be an owner to any record in the org due to a limitation in the Force.com platform.  Access to the records are needed because as soon as the parent record is generated (via the intake form submission) the record ownership change will force the record to not be visible to the sites guest user and thus, will cause errors when saving other related records, such as files or child records during form submission.

STEP 4: Deploy a Custom Sites Home Page Using an Intake Form

Below is an example of a custom Visualforce Page that can be used to to set the home page to your Force.com Site. 

You need to replace the <INTAKE_FORM_RECORD_ID> from the iframe URL with the ID of the intake form within your organization.

<apex:page showHeader="false" sidebar="false">
    <!-- Use this page as Force.com Sites Home Page -->
    <!-- Replace 'formId' value below with Intake Form's Record Id for it be hosted as a Force.com Sites Page -->
    <iframe Id="iFrameForm" src="{!$Site.prefix}/advpm__IntakeForm?hh=1&hs=1&formId=<INTAKE_FORM_RECORD_ID>" scrolling="yes" width="100%" height="100%" frameborder="0" />
    <style type="text/css">
        html, body { height: 100%!important; }
    </style>
    <script type="text/javascript">
        function resizeIFrameToFitContent() {
            var iFrame = document.getElementById( 'iFrameForm' );
            iFrame.height = iFrame.contentWindow.document.body.scrollHeight;
        }
        window.addEventListener('DOMContentLoaded', function(e) {
            resizeIFrameToFitContent();
        });
        window.addEventListener("resize", function(e) {
            resizeIFrameToFitContent();
        });
    </script>
</apex:page>
Previous Article Designing an Intake Form
Next Article Intake Launcher Lightning Component
Still need help? Click here!
AdvoLogix® is a registered trademark of AdvoLogix.com LLC a Texas Limited Liability Company. All references to other trademarks belonging to third parties that appear on this website, documentation, or other materials shall be understood to refer to those registered trademarks owned by others, and not to any trademark belonging to AdvoLogix. Otherwise, all material herein is the copyright of AdvoLogix.com LLC. All Rights Reserved.