Ereignisse
Power BI DataViz Weltmeisterschaften
14. Feb., 16 Uhr - 31. März, 16 Uhr
Mit 4 Chancen, ein Konferenzpaket zu gewinnen und es zum LIVE Grand Finale in Las Vegas zu machen
Weitere InformationenDieser Browser wird nicht mehr unterstützt.
Führen Sie ein Upgrade auf Microsoft Edge durch, um die neuesten Features, Sicherheitsupdates und den technischen Support zu nutzen.
This article explains how to configure document management (document handling) so that it stores file attachments and notes for records. It includes information about the concepts and features that are involved in this functionality.
To learn more about document management, watch the short Document Management video.
Document types are used to categorize the documents that you attach to records or the templates that you create. Each document type can be stored in a unique location.
A default set of document types is provided. You can use these document types to categorize an attachment as a file, image, note, or URL. The File and Image default document types are configured to use Azure storage as the location.
To create a new document type, follow these steps.
Go to the Document types page.
Select New.
In the Type field, enter a short name for the new document type, such as SharePoint or HR Docs.
In the Name field, enter a longer name, such as SharePoint files or HR Docs.
In the Class field, specify a class to define the behavior for the document type:
https://www.microsoft.com
. The Open button on the Attachments page opens the URL on a browser tab.If you specified Attach file in the Class field, in the Location field, specify the storage mechanism to use.
If you specified SharePoint in the Location field, specify the Microsoft SharePoint address in the SharePoint Address field by selecting the Edit button (pencil symbol) and using the Folder selection dialog box.
SharePoint Online is a supported storage location for attachments.
Wichtig
In Dynamics 365 finance and operations version 10.0.40 and later, when the SharePoint user authentication feature is enabled, your organization needs to perform a one-time setup to use the SharePoint integration for non-interactive batch scenarios. This is because the Microsoft-managed high-trust connection between the finance and operations environment and SharePoint has been deprecated.
With this updated SharePoint authentication mechanism, batch connections utilize application access. As this access is not granted by default for tenants, an Entra ID tenant administrator needs to be manually grant access one time for the tenant. This can be done by running the following PowerShell commands to provide the required application consent for finance and operations batch scenarios to connect to SharePoint.
Import-Module Microsoft.Graph.Applications
# The parameter for TenantId needs to be changed
Connect-MgGraph -TenantId microsoft.onmicrosoft.com -Scopes 'Application.ReadWrite.All'
# These AppIds do not change as they are the first party application IDs
$erpServicePrincipal = Get-MgServicePrincipal -Filter "AppId eq '00000015-0000-0000-c000-000000000000'"
$sharePointServicePrincipal = Get-MgServicePrincipal -Filter "AppId eq '00000003-0000-0ff1-ce00-000000000000'"
$spAppRole = $sharePointServicePrincipal.AppRoles | where {$_.Value -eq 'Sites.ReadWrite.All'}
# Assign the SharePoint 'Sites.ReadWrite.All' permission to the Microsoft Dynamics 365 finance and operations application
New-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $erpServicePrincipal.Id -PrincipalId $erpServicePrincipal.Id -ResourceId $sharePointServicePrincipal.Id -AppRoleId $spAppRole.Id
Wichtig
Interactive connections will utilize the logged-in user's context.
To configure SharePoint storage, follow these steps.
Go to the Document management parameters page.
On the SharePoint tab, in the Default SharePoint server field, review the host name that was automatically detected for the SharePoint site, such as contosoax7.sharepoint.com. Typically, the SharePoint host name is in the form tenantname.sharepoint.com, and accounts on that tenant are in the form user1@tenantname.onmicrosoft.com
.
Typically, if no default SharePoint server is specified, either there's no SharePoint site for the tenant, or a valid Microsoft 365 license isn't associated with the current user (the admin).
Optional: Test the SharePoint connection
Optional: Select Open SharePoint to open the specified SharePoint host name in a browser. This action doesn't verify security. It just opens the SharePoint path on a browser tab for easy exploration.
Optional: On the General tab, turn on Open attachments in new window. For more information, see the Other configuration section later in this article.
To use SharePoint storage, set the Location field for a document type to SharePoint. Then, in the SharePoint Address field, enter a valid SharePoint address.
SharePoint communication works for the current user only if the following conditions are met:
A Microsoft 365 license is associated with the user's account.
The user is a typical user on the tenant, not an external user (for example, a user from another tenant).
There's a SharePoint site for the tenant (for example, Contoso.SharePoint.com).
The SharePoint site is configured to Allow this site to appear in search results.
The SharePoint site doesn't use managed device policies.
If managed device policies are enabled on the SharePoint instance, the finance and operations SharePoint integration no longer works. Therefore, users can't download, view, or create documents that are stored in SharePoint from finance and operations apps.
The user has access to the folder that the document is stored in.
If documents that are stored in SharePoint aren't opened or don't appear in preview, follow these steps to troubleshoot the issue.
By modifying the list of file extensions that are allowed, you can control the types of files that users can attach to records.
To specify file types, follow these steps.
The attachments preview uses the Web app Open Platform Interface (WOPI) that Office Online Server provides. On the Document management parameters page, on the General tab, in the Office Web Apps Server field, specify the Office Online Server instance to use for attachment previews. The default value is https://onenote.officeapps.live.com
, which points to the cloud-based WOPI server.
Hinweis
For the following situations, you must adjust the Office Web Apps Server value:
https://onenote.partner.officewebapps.cn
.https://gb4-onenote.officeapps.live.com
.The default cloud-based WOPI server in Finance + Operations (on-premises) can't read the attachment file to provide a preview. If previews are required, you must install an on-premises Office Online Server instance and configure it inside the environment. Set the Office Web Apps Server field to the host name of the installed Office Online Server instance, and then select Save.
If previews aren't required, set the Office Web Apps Server field to https://localhost
. The preview then shows the message "No preview available" instead of an error message.
Document preview (WOPI) doesn't work in environments where an IP safe list is enabled, because the WOPI service that provides the preview can't connect back to the file service to retrieve the file for rendering.
Here are some other configuration options to consider:
Document management appears to users as the Attach button at the top of most pages that contain data. When you select the Attach button (or when you use the corresponding keyboard shortcut, Ctrl+Shift+A), the Attachments page is opened in the context of the data source of the control that's currently selected on the page. This page shows all the attachments that are related to the corresponding data source.
The Attach button also shows a count of the attachments for the currently selected record. Therefore, you can determine whether there are attachments for the current record without having to open the Attachments page. The button shows exact counts for zero through nine attachments. If there are more than nine attachments, the button shows 9+ as the count. In this way, the performance impact and visual noise that exact larger counts might cause are reduced.
As of version 10.0.16/Platform update 40, a history mechanism is available for record attachments. Therefore, your organization can maintain an audit of actions that are related to individual attachments. You can see when an attachment was created, marked for pending deletion, restored, deleted, or moved. You can also see who performed the action. Attachment history isn't maintained until version 10.0.16/Platform update 40. Therefore, any actions that were performed on attachments in earlier versions aren't available.
To enable (or disable) document attachment history, go to Document management parameters > General > History > Enable document history. The default setting of the Number of days to retain history field is 180 days, but you can change it as you require.
There are two entry points for viewing the history of a record attachment:
In Platform update 29, an attachment recovery feature was added. This feature provides a recycle bin for record attachments, so that they can be recovered within a configured period.
To enable attachment recovery, go to Document management parameters > General > Deferred deletion > Deferred deletion enabled. The default setting for the Number of days to defer deletion field is 30 days, but you can change it as you require. If the Number of days to defer deletion value is 0 (zero), deleted attachments are recoverable for an indefinite period.
After you enable attachment recovery, a batch job that's named Scans for deleted references which have reached the end of their retention period is created. This batch job uses the Number of days to defer deletion value to determine how long a deleted attachment should be retained, based on the Deleted date and time value.
When a user deletes an attachment, a notification is added to the Message Center to confirm the deletion. The notification also provides an option that lets you undo the deletion if it was unintended.
Table extension support is built in. Therefore, any extension or custom field values on the DocuRef or DocuValue table are retained to enable their recovery.
When attachment recovery is enabled, attachments can be recovered in one of three ways:
When you work with attachments, you might want to scan the files for viruses and malicious code. Therefore, in version 10.0.12 and later, extension points are available so that customers can integrate with the file scanning software of their choice when they work with attachments. A similar extension point is also available for file upload. For more information, see File upload control.
Wichtig
Out of the box, finance and operations apps don't scan files for viruses and malicious code, and we don't recommend specific software for file scanning. Instead, customers are responsible for choosing their own file scanning software, and for adding the appropriate code to the delegate handlers so that they can use the software or service of their choice to scan files.
The Docu class exposes the following two delegates. Handlers can be implemented for these delegates for document scanning purposes:
The following example of the ScanDocuments class shows boilerplate code for the two handlers. For general information about how to implement handlers for delegates, see EventHandlerResult classes in request or response scenarios.
public final class ScanDocuments
{
[SubscribesTo(classStr(Docu), staticDelegateStr(Docu, delegateScanDocument))]
public static void Docu_delegateScanDocument(DocuRef _docuRef, EventHandlerRejectResult _validationResult)
{
if (!ScanDocuments::scanDocument(_docuRef))
{
_validationResult.reject();
}
}
[SubscribesTo(classStr(Docu), staticDelegateStr(Docu, delegateScanDeletedDocument))]
public static void Docu_delegateScanDeletedDocument(DocuDeletedRef _docuDeletedRef, EventHandlerRejectResult _validationResult)
{
if (!ScanDocuments::scanDeletedDocument(_docuDeletedRef))
{
_validationResult.reject();
}
}
private static boolean scanDocument(DocuRef _docuRef)
{
/*
Custom implementation required for connecting to a scanning service
If document scanning process found an issue, return false; otherwise, return true;
*/
return true;
}
private static boolean scanDeletedDocument(DocuDeletedRef _docuDeletedRef)
{
/*
Custom implementation required for connecting to a scanning service
If document scanning process found an issue, return false; otherwise, return true;
*/
return true;
}
}
The following APIs from the DocumentManagement
class let developers specify the file content type (MIME type) of the file that's being attached:
If the file content type isn't specified correctly, the attached document might not behave as expected. Therefore, if you use these APIs, you should consider one of the following courses of action:
Pass null for the _fileContentType
parameter in any of the preceding APIs. This course of action enables the correct content type to be inferred from the file name.
Switch to using one of the following methods that don't include a _fileContentType
parameter. This course of action helps prevent the possibility that incorrect file content types are passed.
In version 10.0.40 and later, the Export attachments feature is available in Document management. Use this feature to export files and metadata that are attached to records of tables in finance and operations apps.
To export attachments, follow these steps.
Go to Organization administration > Document management parameters > Export attachments.
On the Export attachments page, on the Action Pane, select New to add a row for the first table that you want to export attachments for. Repeat this step until all the tables that you need attachments for are listed. The following table describes the fields that are available on the Export attachments page.
Field name | Description | Example value |
---|---|---|
Table name | The name of the table that you want to export attachments for. | CustInvoiceJour |
Table label | The label that's assigned to the selected table. Note that multiple tables can share the same label. | Customer invoice journal |
Date field name | A date field of the selected table. The export job uses this field as a criterion to apply the Date from and Date to range that you specify to export attachments. | InvoiceDate |
Date field label | The label that's assigned to the selected date field. | Date |
Enabled | When this checkbox is selected, the system includes the selected table with the next export job. | Selected |
On the Action Pane, select Export to open the Export attachments dialog box. The following table describes the fields that are available in the Export attachments dialog box.
Field name | Description | Example value |
---|---|---|
From date | Specify the first date of the period that you want to export attachments for. The export job applies this period to the Date field name value of the selected tables that are configured to export attachments. | 1/1/2023 |
To date | Specify the last date of the period that you want to export attachments for. The export job applies this period to the Date field name value of the selected tables that are configured to export attachments. | 12/31/2023 |
File type | Specify the file type that's used to create an archive of exported attachments. This file type must be set up as described in the Configure file types section. Select File in the list of file types. Alternatively, use a similar custom file type that you set up with an Attach file value in the Class property of the document type. | File |
Compression level | This parameter determines how much the data in an archive is compressed. Specifically, it defines whether a compression operation emphasizes speed or compression size. Select one of the following options:
|
Optimal |
Maximum file size in megabytes | Use this parameter to limit the size of the created archive. The value redefines the value that's set for the Maximum file size in megabytes parameter on the Document management parameters page for a specific execution of the Export attachments job. If the size of the archive file exceeds the value that you set here, multiple files are created and attached. A large Maximum file size in megabytes value might affect the performance of job execution. | 90 |
Include metadata | If you set this option to Yes, the system includes Note and URL type attachments and the metadata of File type attachments in the export job. Exported metadata is exported as separate JavaScript Object Notation (JSON) files. If you leave this option set to No (the default value), only attachments of the File type are exported without metadata. | Yes |
On the Run in the background FastTab, set the Batch processing option to Yes, and then specify the necessary parameters to run the Export attachments job in the background. Attachments are exported for the legal entity where the job is run.
Select OK to start to run the Export attachments job.
When the Export attachments job is completed, you can find the exported attachments in the archives that are attached for each enabled table. Depending on the volume of the exported attachments in the specified period, and the value of the Maximum file size in megabytes parameter in the Export attachments dialog box, the archive might be automatically split into several files.
The name of each attached archive is in the format LE_TableName_DateFieldName_Period_SeqNum.zip and contains the following information:
The name of each attachment that's included in an archive is in the format RecID_AttachmentName_AttachmentDate_SeqNum.xxx and contains the following information:
There's no difference between document handling and document management. Both terms refer to the same functionality. Different terms are used in different versions of the product.
Document management lets you add notes, documents, and other files to records.
Print management lets you control print settings for selected reports. Print settings include the number of copies, the printer destination, and the multilanguage text that can be included on the report. For more information, see Document Reporting Services.
Document types are used to categorize the documents that you attach to records or the templates that you create. Each document type can be stored in a unique location. The table for document types is named DocuType.
File types include Word documents and images. A file type is denoted by the extension of the file, such as .txt, .png, .doc, .xlsx, or .pdf.
Yes. SharePoint storage is supported natively and can be selected as the storage location for a document type. In addition, any URL addressable file can be made an attachment via the URL document type.
By default, attachments are saved in Azure Blob storage automatically as part of the product cloud offering.
When you delete attachments that are stored in Azure Blob Storage, they're permanently deleted. The references to those attachments are also deleted. Therefore, if you accidentally delete an attachment, it can't be restored or recovered.
Record attachment information is stored in the DocuRef and DocuValue tables. The DocuRef table is the record that represents the attachment. The DocuRef record points to both the record that's being attached to and a DocuValue record. The DocuValue record points to the file that's the attachment. Files are stored outside the database. Therefore, any database operations, such as restorations from a backup, affect only the database information about the attachment, not the attachment file itself.
No. By default, attachments are stored in Azure Blob storage.
Database storage is Azure SQL Database. File storage is Azure Blob storage. Azure Blob storage is simpler and much less expensive.
That information is in the licensing guide. Currently, you get 40 gigabytes (GB) of storage.
The cost for additional storage varies, but it's similar to the standard Azure costs for storage. In other words, the cost is about $0.05 per GB.
There's proactive communication when you're approaching your database and file storage limits. However, Microsoft Dynamics Lifecycle Services provides some information, and you can log support requests for additional information.
Although attachments can be exported, that capability isn't a standard capability, because there isn't a standard attachment entity. Entities that provide attachments for a specific business document or record must be built.
To extract attachments, you must build an Attachments entity for a specific business document or record. There isn't a standard attachment entity because the identity for each record type is different. To learn how to build an Attachments entity, you can review the examples in Application explorer. To find these examples, search for "Attachment" under the AOT > Data Model > Data Entities node.
The WOPI service retrieves the files from SharePoint by using the current user permissions. The files are then rendered in HTML to provide a document preview. The current user must have access to the files to preview or open them.
Explanation: Typically, this issue occurs because the token for the Office Web Apps Server is no longer valid.
Fix: The admin needs to select the Token refresh button to the right of the Office Web Apps Server field on the Document management parameters page under the General tab.
Ereignisse
Power BI DataViz Weltmeisterschaften
14. Feb., 16 Uhr - 31. März, 16 Uhr
Mit 4 Chancen, ein Konferenzpaket zu gewinnen und es zum LIVE Grand Finale in Las Vegas zu machen
Weitere InformationenTraining
Lernpfad
Use advance techniques in canvas apps to perform custom updates and optimization - Training
Use advance techniques in canvas apps to perform custom updates and optimization
Zertifizierung
Microsoft Certified: Information Protection and Compliance Administrator Associate - Certifications
Veranschaulichen der Grundlagen von Datensicherheit, Lebenszyklusverwaltung, Informationssicherheit und Compliance zum Schutz einer Microsoft 365-Bereitstellung
Dokumentation
Entfernte oder veraltete Plattformfunktionen - Finance & Operations | Dynamics 365
Erfahren Sie mehr über die Features, die bei Plattform-Updates der Finanz- und Betriebs-Apps entfernt wurden oder deren Entfernung geplant ist.
Sicherungsspeicher von EB-Vorlagen - Finance & Operations | Dynamics 365
In diesem Artikel wird erläutert, wie der Sicherungsspeicher der elektronischen Berichterstellung (Electronic Reporting, ER) zum Wiederherstellen von Vorlagen verwendet wird.