AdvoLogix Help

SharePoint Document Viewer⚡ Component

Updated on

The SharePoint Document Viewer lightning component is a featured component that allows previewing a SharePoint document or linking a specific document by saving the document URL into a specific field on the record. For more information, follow this link.

Deployment Use Cases

The document viewer component is designed for use within lightning home, app and record pages. The primary use case for the component is within the context of a given record; however, the component may also be deployed to any lightning page.

Deployment Options

  • Identifier: Use a unique identifier to identify this component on the lightning page. The document viewer can be deployed multiple times on the same page layout. This option provides each instance of the component a unique set of run-time options.
  • URL Field: Optionally, select a field to store the URL of the document the user selects to display within the component.
  • URL of your document: Optionally, provide the URL of the SharePoint document to be loaded in the component.
  • Height of the document viewer (in pixels): Provide the height of the document viewer component.
  • Login As - Optionally, provide a user to automatically authenticate all SharePoint related operations within the component. The provided user must be enabled as Secured Login within SharePoint Setup. For more details, follow this article.

When a Login As user is provided within the app builder deployment options, all operations related to SharePoint are performed on behalf of that selected user. The current user cannot log in or log out from SharePoint from within the component. 

If the provided secured logged in user logs out from their environment, then the user is logged out from all instances of the components where the secured login has been setup to use as via the Login As option.

Using the Document Viewer

Each instance of the component can be bound to a single document. 

  • If the URL Field is provided in the component deployment options: once a user has chosen a document to be viewed in the component, AdvoLogix will save that document's URL in that field, and this gives the option for users to bind different documents to different records.
  • If the URL Field is left empty and the URL of the document is provided in the component deployment options: AdvoLogix will load the same document for all records this component is visible on.
  1. Choose Document - Allows users to browse the SharePoint documents and select a document within the component.
    • If the URL Field is provided in the component deployment options, then the selected document's URL will be saved in the URL field.
  2. Open in SharePoint - Allows users to open the document in SharePoint in a new browser tab.
  3. Zoom Out - Navigates the user to the full-view mode of the document.
  4. Close- Close the currently selected document.
    • If the URL Field is provided in the component deployment options, then the field's value will be cleared out on this action.
  5. Document Viewer - Provides a preview of the selected document.

The document viewer lightning component allows previewing of only Microsoft Office files (.docx, .xlsx, & .pptx).

Previous Article SharePoint Connector⚡ Component
Next Article SharePoint My Favorites⚡ 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.