Installation Manual

Navigation

Navigate easily through the manual. 

Navigation

24Files - The application

What is 24Files?

24Files is a SharePoint-Salesforce connector, that enables teams to communicate with as well internal partners as external ones. In order to enhance the collaboration, reduce the throughput time and become a central document library.

How does 24Files works?

First of all, check out this page for more detailed information: How does 24Files works

Secondly, more from a technical point of view:

  • 24Files is only available for Salesforce lightning, as we use a lightning component. 
  • 24Files will create a folder structure in SharePoint from the moment the Lightning component gets loaded on the object record.
  • From the moment the folder structure is created in SharePoint, it is possible to manage files & folders from both sides (bi-directionaly sync). 
  • The following is related to Folder structures. More information can be found in the Folder Structure section: Upon loading the 24Files component on an object record page for the first time, 24Files first searches for ‘Not-default folder structures‘ and if no ‘Not-default folder structures‘ are applicable or found, it will search for a ‘Default folder structure‘ for that object. If no ‘Default folder structure’ exists for that object, it will create a ‘Default folder structure‘.

24Files objects in Salesforce

24Files creates 6 custom objects in your org. Here follows the description of those objects:

24Files Folder Structure
This object enables you to create folder structures. It stores the folder structures created and fields such as ‘default’, the object, the filter logic, the record folder path etc.

24Files Folder Structure Junction
Contains information about the specific record that is linked to that specific Folder Structure and contains some specific information about the record, like changed Public folder name, last opened date (for technical purposes) and etc.

24Files Folder Structure Rule
To customise your folder structures, you can add filter rules. This object stores the rules that are connected to the folder structure 

24Files Object Configuration
In order to create the SharePoint add-in, configure the SharePoint sites, document library etc

24Files Chatter File link
To enable the possibility to tag files in Chatter

24Files Additional Folder
Contains information about the additional folders for the Folder Structure. It contains Label and path to the folder and determines the public folder

Before configuration

Set up your domain

Be sure that a domain is set up, before starting with the configuration of 24Files. 

From Salesforce, go to Setup, enter ‘My Domain‘.
Follow the guidelines from Salesforce until the domain is deployed to your users. This can take some minutes.

Remote Site Setting

Create a Remote Site.

From Setup, enter Remote Site Setting in the search bar.

  • Add a Site Name and add the URL to your Sharepoint.
  • Select the Active checkbox

See the Example below. 

remote site setting

Configuration

SharePoint Add-In Creation

If you have not installed 24Files yet, please do so.

If 24Files is installed, you will now create the ‘add-in’ to SharePoint. In other words, you will now create the connection between SharePoint and Salesforce.

This steps exists of 2 links. First we will create the Client Id & Client secret and after that, we will grant the necessary permissions. !This can only be done by the administrator of SharePoint!

Let’s start with the first link

FIRST LINK: GENERATE CLIENT ID & CLIENT SECRET

First, replace ‘yourinstance’ in the link below with your own SharePoint company name, this way you will be directed to the correct page.

https://yourinstance-admin.sharepoint.com/_layouts/15/AppRegNew.aspx

  1. Generate a Client ID & Client Secret, by clicking on the “Generate” buttons. 
  2. Add a Title for the Add-In. You can Use SharePoint, Office365, 24Files etc. 
  3. For the App Domain & Redirect URL go back to Salesforce to the 24Files Manager (search for it in the app launcher), then click on 24Files Settings. There you will find a Redirect URL for the add-in creation.
  4. For the  App Domain, copy the part after “https://”  & before “/apex” of the Redirect URL and paste it. The Redirect URL below will be the full link. 
  5. Click on create, but do not close this window! You will need the Client ID & Client Secret later on.

1. Generate the Client ID & Client Secret
2. Add the Title

Add-in_ClientID_Secret

3. Go to 24Files Settings for the redirect URL

CompleteRedirectURL

4. Select a part of the Redirect URL for the App Domain

FINAL Complete Add-in:

Complete_Add-in_ClientID_Secret
SECOND LINK: PERMISSION REQUESTS

First, replace ‘yourinstance’ in the link below with your own SharePoint company name, Replace ‘yourinstance’  in the link below with your own SharePoint company name, this way you will be directed to the correct page.

 

https://yourinstance-admin.sharepoint.com/_layouts/15/AppInv.aspx

  1. In the App Id (= Client ID) field, paste the Client ID that you have created in the link before.
  2. Click on ‘Look up‘ and all the other fields will be filled in.
  3. Copy paste the permissions below into the Permission Request XML field:
    <AppPermissionRequests AllowAppOnlyPolicy="true">
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Write" />
    <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="Write" />
    </AppPermissionRequests>

Example:

Click Create and then click Trust it when the “Do you trust Office 365?” question pops up.

24Files Manager

First we will finish the add-in creation. In other words, we finalise the connection between SharePoint and Salesforce. 
Then, you will able to configure 24Files to your needs. We will guide you through it, but keep in mind that this will be specific to your company needs. 

24Files Settings

ADD-IN CREATION: FINAL

Go via the AppLauncher to the 24Files Manager, then to 24Files settings tab. 

Here you will first have to enter the Company name in SharePoint, then Client ID & Client Secret. 

  1. Company Name in SharePoint: you can see this in the URL of SharePoint. The part between “https://” and “SharePoint.com” is your company name. (If you’re an admin, exclude the -admin part as well).
    Example: https://scalefactoryeu.sharepoint.com/
  2. Client ID: You need to copy this from the Add-In in the previous step.
  3. Client Secret: You need to copy this from the Add-In in the previous step.
  4. Click Connect
  5. Does there appear a pop-up with the message: “‘Follow the connection instructions in the installation manual: ‘Powershell connection’.” ?
POWERSHELL CONNECTION

If you receive a warning after connecting to SharePoint: “Follow the connection instructions in the installation manual: ‘Powershell connection.”, you have to execute the following:

  1. Install extension for PowerShell (https://www.microsoft.com/en-us/download/details.aspx?id=35588)
  2. A. Add the following command:
    Connect-SPOService -Url https://yourinstance-admin.sharepoint.com (replace yourinstance with your SharePoint instance name)
    B. Login with the admin username and password. 
    If a new line shows in the command, the login succeeded.
  3. Add the following command to the Powershell: 
    set-spotenant -DisableCustomAppAuthenication $false
    And Enter.

2. Example of command

3. Example of command

SHAREPOINT SITE CONFIGURATION

After connecting (and perhaps the Powershell connection), you will have to login to SharePoint via the blue button.

Then Trust Office365.

After that, you will be redirected back to Salesforce. And the blue button is replaced with the SharePoint site picker.  

In the section “Default Sharepoint Site“:

  • Type and search for the Sharepoint Site that you want to store the files in, if no object specific configuration exists in section “Object Specific Configuration”. The loading may take a few seconds. (It’s important to state that you should select a site from the pick list.)
  • Click save
  • Next to that, you can select the appropriate document library. 

In the section “Object Specific Configuration“:

  • You can configure another Sharepoint Site to use for a specific Object and Record Type combinations.
  • Next to that, you can select the appropriate document library. 

See an example below:

FOLDER STRUCTURE

At the bottom, you find the Create button for Folder Structures. This will bring you to the Folder Structure tab, that will be discussed below.  

24Files Folder structure

WHAT IS A FOLDER STRUCTURE

A folder structure is the way folders are organised in your SharePoint. This is differs for each company. 

Below, you will receive more information on how you can specify these folder structures to your needs. 

WHAT IS WHAT - TERMS YOU WILL NEED

Folder structure VS Folder structure record
Folder structure = this is the way folders are organised in your SharePoint
Folder structure record (FSR from here) = the Salesforce record where you will enter all the specifics for the folder structure that will be created in SharePoint. Each time you will create an object record in Salesforce containing all information about the folder structure. 

Default folder structure record
This is your last resort & back-up plan, concerning the folder structures. This is a folder structure record (FSR) that is automatically created by 24Files or can be created by yourself. 

This ‘Default folder structure record‘ will be used, when no ‘Not-default folder structure records‘ are applicable. 

Not-default folder structure record
Not-default folder structure records are records that contain filter rules. 

Logic of 24Files:
Upon loading the 24Files component on an object record page for the first time, 24Files first searches for ‘Not-default folder structures‘ and if no ‘Not-default folder structures‘ are applicable or found, it will search for a ‘Default folder structure‘ for that object. If no ‘Default folder structure’ exists for that object, it will create a ‘Default folder structure‘.

Filter rules
Filter rules determine the folder structure record (FSR) that will be applied to a certain Object Record.

Important: once the 24Files component gets loaded on the object record, a folder structure will be created in SharePoint. From then on, the folder structure is fixed and can only be changed by manual changes (such as folder movement, renaming etc). In other words, filter rules will no longer have an impact on the object record nor will changes that happen on the Object Record change the Folder Structure Record. 

FOLDER STRUCTURE RECORD

First, we will deep-dive in the Folder Structure Record (FSR) and discuss what is possible. After this, we will guide you through the process of creating a Folder Structure Record. 

1. Detail Section
This section contains:

  • 24Files Folder Structure Name: The name of the Folder Structure record
  • Object: Via a picklist, you can select the Salesforce object for that Folder Structure record.
  • Default: When selected, that Folder Structure is the default one. There can only be one default Folder Structure per object!
    When there is no ‘Default Folder Structure‘, 24Files will create a Default Folder Structure, namely: Document Library –> [Object name] –> Record folder –> Public folder 

2. Filter Rules

Filter rules can only be used for ‘Not-default folder structures‘. 

  • Conditions: 3 options, All of the conditions (= rules) should be fulfilled (AND) or Any of the conditions should be fulfilled (OR) or you can customise the logic (for example 1 AND (2 OR 3)). 
  • Field: The corresponding field for that object. You can select a field by clicking on the field and a pop-up screen will appear.
  • Operator: an operator such as ‘Equals’, ‘Starts with’, ‘Contains’ etc can be used
    •  ! If you use ‘Is Null’: enter ‘true’ or ‘false’ as values
  • Type: The field type: ‘Field reference’, ‘Picklist’ or ‘Boolean’.
  • Value: The corresponding value.
    • ! Case sensitive! 
    • ! For fields with date type, use this format: dd/mm/yyyy, for datetime: dd/mm/yyy hh:mm:ss

Important: once the 24Files component gets loaded on the object record, a folder structure will be created in SharePoint. From then on, the folder structure is fixed and can only be changed by manual changes (such as folder movement, renaming etc). In other words, filter rules will no longer have an impact on the object record nor will changes that happen on the Object Record change the Folder Structure Record. 

3. Folder Structure

A folder structure always start with the ‘Document Library’. This is the ‘Document Library’ that you’ve chosen in the 24Files Settings. After this, you are able to create the folders yourself. 

To add folders, you have to click on the dropdown sign and click on ‘Create a subfolder’. Then, a subfolder will be created on the level below the folder you’ve selected. You can rename and remove a subfolder. 

To save the folder structure, a Record Folder is required. A record folder can be added by ‘Creating a subfolder’ and then selecting the ‘Is Record Folder’ checkbox. You do not have the name the record folder right there. See below how to choose the name for the Folder Record. Important: Only one record folder can be present. 

If a record folder is created, automatically a Public folder will be created as a subfolder of it. The public folder cannot be removed, only renamed. This public folder is important for the ‘Anonymous Access’. This folder will be the only folder visible for Anonymous Access users of 24Files (= user without SharePoint login). You can find more information below in the ‘Sharepoint plugin in Salesforce’ section. 

You have already folder present in SharePoint that you want to use?

No problem! You only have to create a subfolder with the exact same name and 24Files will figure it out.

Example: 
1. We have 2 product families, the Receivers and the Antennas. We have a separate folder in SharePoint and we are creating a folder structure for the Receivers

2. The only thing we have to do in Salesforce, is create a subfolder named ‘Receivers’. 

3. Result

What if two or multiple Folder Structures Records (FSR) fit for one record?

The first time a user visits the Object Record, a pop-up will appear to give you a choice between the ‘Not-default folder structure records’. Reminder: A ‘Default FSR‘ is a back-up plan.

Once a folder structure is chosen, it will not be possible to change it again.

If no Folder Structure is selected, the following error will appear: “There is no selected folder structure”. This can be resolved be refreshing the page and the pop-up will appear again. 

4. Folder Record Name

To name the record folder, go to the ‘Folder Record Name’ component. 

It is possible to type text and you can insert fields.

Important: if no value is found for the field, null will appear instead for that field. For example: if the Folder Record Name is: {!Name} {!Description} and no value is in the field ‘Description’, the record will be named like this: “Mosaic-Sx null”. 

HOW TO CREATE A FOLDER STRUCTURE RECORD

By default, 24Files will create a ‘default folder structure record (FSR), if you don’t create a ‘default folder structure record‘ yourself.
Main reason: having a back-up plan if no ‘Not-default folder structure‘ (= folder structure record with filter rules) is applicable.

You can customise a ‘default folder structure record to your needs or accept the default setup, which is Document Library –> [Object Name] –> [Record Folder name]

Example: 

A ‘Default folder structure record‘ is always needed. I don’t need a customised folder structure, so I don’t have to create a folder structure myself.24Files will create one, from the moment the lightning component of 24Files gets added to the page (see below)

Imagine that I wanted a specific folder structure for the ‘default FSR‘. Then I go to the Folder Structure tab, click on ‘New’ (1), enter a name for the FSR, select the checkbox and then select the right object. From there, I can customise the name and the folder structure itself (2). 

(1) After clicking on NEW, you get this screen

(2) Then you will receive this.

After the creation of the ‘Default FSR‘, a ‘Not-default FSR‘ can be created, but is not obligated. 

 

24Files Lightning component

As final step of the 24Files configuration, the lightning component needs to be added to a lightning page. 

  1. Go to the Object where you want to use 24Files.
  2. Then go into a record.
  3. After that, click on Settings & Edit Page. 
  4. Select in Lightning Components under Custom – Managed the 24Files lightning component. 
  5. Drop it onto a page
FUNCTIONALITIES OF THE LIGHTNING COMPONENT

The lightning component can be modified on object record level.

Parent Record
It is possible to show files from the parent object. In this field you will have to fill in the ‘Field Name’ of that parent object. 
Example: On the contact page, you want to see all files related to the company of that contact (= Account). All files & folders of the Account will be shown and you will be able to perform all folder & file actions. The bi-directional sync will work here. 

Field Name of parent record (Account) of Contact object is ‘AccountId’

This needs to be filled in the ‘Parent Record’ field.

Access: Authenticated & Anonymous

Authenticated: 
Everything a salesforce user does, will be tracked and assigned to this user. You need to login to Sharepoint via the component to have access.

Authenticated access includes that a user is able to upload, download, preview, rename, move and delete a file. Also is it possible to create a new folder.

Anonymous:
It’s possible to upload a file, without having credentials to SharePoint, so user won’t able to login via the 24Files lightning component. 

Anonymous access includes that a user is able to upload, download and preview the file he uploaded, but you can enable the delete, rename and move functionality on component level, below the Access picklist. 

No license Error Text
If you bought the user based version of 24Files. You can customise the error text that has to appear when a user has no license assigned. 

Add to mobile view - Salesforce Application

To use 24Files on the Salesforce application, you only have to activate this on the Object Record Page

  1. Click on the settings page, then ‘Edit page’
  2. Click ‘Activation’
  3. Set as default for ‘Phone’

To be sure: double check via the Phone preview, if the 24Files lightning component is added.

User configuration

Permissions

Assign the right permission set to the right user, namely ’24Files user’ or ’24Files Admin’.

24Files user
This is the common user of 24Files. This user will only need the necessary and does need the rights to change Folder Structure Records.

All these permissions are needed because records have different owners. In order for 24Files to modify the records, the ‘Modify all permission’ is needed.

For every profile, make sure to add all the required fields permissions. It’s possible that if not all necessary field permissions are given, the following error message will appear: “Not enough access to 24Files [XXX] object”.
Go to ‘Profiles’ –> Field-Level Security –> In the Custom Field-Level Security section, you will find the 24Files objects –> Click View

24Files Admin

This is the permission set for the System Administrator. That’s why we recommend the following settings. 

License Assignment

This section is only applicable for a version installed in Production. & when using the user-based version of 24Files. When having a trial, you won’t need to assign licenses as you are using the enterprise edition. 

When a user wants to manage SharePoint files & folders through the 24Files component, a license of 24Files is needed. 

This is how you do it:

  1. From Installed Packages, you select ‘Manage Licenses’ for the 24Files app. 
  2. On this screen, you will be able to add and remove users. Next to this, other information concerning your license for 24Files is displayed. 

Application Maintenance

Refresh Client ID & Client Secret

Each year, the Client ID & Client Secret (created through the add-in) need to be refreshed in order to secure the connection between Salesforce & SharePoint.

To refresh this, you have 2 options:

Recreate the Add-in by following the steps above.
OR
by following the next steps in the Powershell: 

  1. Run the Powershell on your windows computer
  2. Once opened, you need to log in into your environment. Execute the following command and you will get a prompt to enter your credentials (picture A):
    Connect-MsolService 
  3. A pop-up will appear that directs you to the Microsoft login page.
  4. Enter your credentials. 
  5. If you are logged in successfully, you will receive no message in the powershell
  6. Copy the next script and paste into the PowerShell (picture B). Press enter:
    $bytes = New-Object Byte[] 32
    $rand = [System.Security.Cryptography.RandomNumberGenerator]::Create()
    $rand.GetBytes($bytes)
    $rand.Dispose()
    $newClientSecret = [System.Convert]::ToBase64String($bytes)
    $dtStart = [System.DateTime]::Now
    $dtEnd = $dtStart.AddYears(1)
    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Symmetric -Usage Sign -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Symmetric -Usage Verify -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Password -Usage Verify -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
    $newClientSecret
  7. You will receive refreshed Client Secret which you can use in the 24Files app (picture C). 

Picture A

Picture B

Picture C

Chatter Functionality

In chatter, enter a ‘/’ and you can ‘tag’ a SharePoint file. 

Troubleshooting

Please find the most common issues here: FAQ Page

If the answer you are looking for, is not on the FAQ Page. Please contact support.