Audit policy rules
Dynamics 365 for Finance and Operations has evolved into purpose-built applications to help you manage specific business functions. For more information about these changes, see Dynamics 365 Licensing Guide.
You can use audit policies to evaluate expense reports, vendor invoices, and purchase orders to make sure that they comply with policy rules that you create. All of the rules that are associated with an audit policy are run in batch mode, according to a schedule that you specify. Each policy rule is an instance of a policy rule type. For each policy rule type, only one policy rule can be active at a time.
Queries and query types
When you create an audit policy rule, you first select a policy rule type. The policy rule type specifies the Application Object Tree (AOT) query to use as the starting point for creating the policy rule. It also specifies the query type to use for the policy rule. The query determines the source document that the policy rule evaluates. It also specifies the fields in the source document that identify both the legal entity and the date to use when documents are selected for audit. The query type controls the default fields in the query page and in the Audit policy rule page. The following table shows the query types that are available for audit policy rules.
|Query type||Purpose||More information|
|Conditional||Evaluate source document attributes against specified values.|
|Aggregate||Evaluate multiple source documents or source document lines against a policy rule by aggregating numeric values.|
|Sampling||Randomly select a specified percentage of the source documents to evaluate for policy violations.||When you select this option, use the Audit policy rule page to specify the percentage of documents to randomly select for audit.|
|Duplicate||Evaluate source documents to determine whether they contain duplicate entries in specified fields.||When you select this option, use the Audit policy rule page to specify the number of days to add to the start of the document selection date range when documents are evaluated for duplicate entries.|
|List search||Evaluate source documents for specific entities.||The root document of the query defines the document that is being audited. The query must be a list query that includes a reference to the dirpartytable table. This option can be used only with the following AOT queries:
|Keyword search||Evaluate source documents to determine whether they contain certain words.||When you select this option, enter the words to look for in the Audit policy rule page. The Audit policy rule page also includes options that let you specify the tables and fields to evaluate for the words you entered.|
All of the policy rules for a particular audit policy share the same batch parameters and the same document selection date range. These parameters are specified for the policy in the Additional options page.