51黑料不打烊

Connect an Adaptive Form to Microsoft庐 SharePoint Document Library connect-af-sharepoint-doc-library

This video is applicable only for Core Components. For UE/Foundation Components, please refer to the article.

To use the Submit to SharePoint Document Library Submit Action in an Adaptive Form:

  1. Create a SharePoint Document Library Configuration: It connects AEM Forms to your Microsoft庐 Sharepoint Storage.
  2. Use the Submit to SharePoint submit action in an Adaptive Form: It connects your Adaptive Form to configured Microsoft庐 SharePoint.

1. Create a SharePoint Document Library configuration

To connect AEM Forms to your Microsoft庐 Sharepoint Document Library storage:

  1. Go to your AEM Forms Author instance > Tools > Cloud Services > Microsoft庐 SharePoint.

  2. Once you select the Microsoft庐 SharePoint, you are redirected to SharePoint Browser.

  3. Select a Configuration Container. The configuration is stored in the selected Configuration Container.

  4. Click Create > SharePoint Document Library from the drop-down list. The SharePoint configuration wizard appears.

    Sharepoint configuration

  5. Specify the Title, Client ID, Client Secret and OAuth URL. For information on how to retrieve Client ID, Client Secret, Tenant ID for OAuth URL, see .

    • You can retrieve the Client ID and Client Secret of your app from the Microsoft庐 Azure portal.

    • In the Microsoft庐 Azure portal, add the Redirect URI as https://[author-instance]/libs/cq/sharepoint/content/configurations/wizard.html. Replace [author-instance] with the URL of your Author instance.

    • Add the API permissions offline_access and Sites.Manage.All to provide read/write permissions.The Sites.Manage.All is a permission scope in Microsoft鈥檚 Graph API that grants an application the ability to manage all aspects of SharePoint Sites such as deleting or modifying Sites.

      note note
      NOTE
      You can also configure the SharePoint Sites with limited access by using the Sites.Selected permission scope in Microsoft鈥檚 Graph API. The Sites.Selected is a permission scope in Microsoft鈥檚 Graph API that allows more granular and restricted access to SharePoint sites.
    • Use OAuth URL: https://login.microsoftonline.com/tenant-id/oauth2/v2.0/authorize. Replace <tenant-id> with the tenant-id of your app from the Microsoft庐 Azure portal.

      note note
      NOTE
      The client secret field is mandatory or optional depends upon your Azure Active Directory application configuration. If your application is configured to use a client secret, it is mandatory to provide the client secret.
  6. The offline_access Sites.Selected permission scope in Microsoft鈥檚 Graph API that allows more granular and restricted access to SharePoint sites. The offline_access Sites.Manage.All permission scope in Microsoft鈥檚 Graph API that allows full access to SharePoint sites.

  7. Click Connect. On a successful connection, the Connection Successful message appears.

  8. Now, select SharePoint Site > Document Library > SharePoint Folder, to save the data.

    note note
    NOTE
    • By default, forms-ootb-storage-adaptive-forms-submission is present at selected SharePoint Site.
    • Create a folder as forms-ootb-storage-adaptive-forms-submission, if not already present in the Documents library of the selected SharePoint Site by clicking Create Folder.

Now, you can use this SharePoint Sites configuration for the submit action in an Adaptive Form.

2. Use SharePoint Document Library Configuration in an Adaptive Form

You can use the created SharePoint Document Library configuration in an Adaptive Form, to save data or generated Document of Record in a SharePoint folder.

NOTE
  • Select the same Configuration Container for an Adaptive Form, where you have created your SharePoint Document Library storage.
  • If no Configuration Container is selected, then the global Storage Configuration folders appear in the Submit Action properties window.
Foundation Component

Perform the following steps to use a SharePoint Document Library storage configuration in an Adaptive Form based on Foundation Component as:

  1. Open the Adaptive Form for editing and navigate to Submission section of the Adaptive Form Container properties.

  2. From the Submit Action drop-down list, select Submit Action as Submit to SharePoint.

    Sharepoint GIF {width="50%"}

  3. Select the Storage Configuration, where you want to save your data.

  4. Click Save to save the Submit settings.

note note
NOTE
  • When you submit the form, the data is saved in the specified Microsoft庐 Sharepoint Document Library Storage. Folder structure to save data is /folder_name/form_name/year/month/date/submission_id/data.
  • Attachments are also stored in the /folder_name/form_name/year/month/date/submission_id/data directory. However, if you select Save Attachments with Original Name, the attachments are stored in the folder using their original filenames.
Core Component

Perform the following steps to use a SharePoint Document Library storage configuration in an Adaptive Form based on Core Component as:

  1. Open the Content browser, and select the Guide Container component of your Adaptive Form.
  2. Click the Guide Container properties Guide properties icon. The Adaptive Form Container dialog box opens.
  3. Click the Submission tab.
  4. From the Submit Action drop-down list, select Submit Action as Submit to SharePoint.
    Sharepoint GIF
  5. Select the Storage Configuration, where you want to save your data.
  6. Click Save to save the Submit settings.
note note
NOTE
  • When you submit the form, the data is saved in the specified Microsoft庐 Sharepoint Document Library Storage. Folder structure to save data is /folder_name/form_name/year/month/date/submission_id/data.
  • Attachments are also stored in the /folder_name/form_name/year/month/date/submission_id/data directory. However, if you select Save Attachments with Original Name, the attachments are stored in the folder using their original filenames.
Universal Editor

Perform the following steps to use a SharePoint Document Library storage configuration in an Adaptive Form authored in Universal Editor as:

  1. Open the Adaptive Form for editing.

  2. Click the Edit Form Properties extension on the editor.
    The Form Properties dialog appears.

    note note
    NOTE
    • If you do not see the Edit Form Properties icon in your Universal Editor interface, enable the Edit Form Properties extension in the Extension Manager.
    • Refer to the article to learn how to enable or disable extensions in the Universal Editor.
  3. Click Submission tab and select Submit to SharePoint submit action.
    Sharepoint GIF

  4. Select the Storage Configuration, where you want to save your data.

  5. Click Save&Close to save the Submit settings.

note note
NOTE
  • When you submit the form, the data is saved in the specified Microsoft庐 Sharepoint Document Library Storage. Folder structure to save data is /folder_name/form_name/year/month/date/submission_id/data.
  • Attachments are also stored in the /folder_name/form_name/year/month/date/submission_id/data directory. However, if you select Save Attachments with Original Name, the attachments are stored in the folder using their original filenames.
recommendation-more-help
fbcff2a9-b6fe-4574-b04a-21e75df764ab