AptlyStar

Microsoft Dataverse

Manage records in Microsoft Dataverse tables

使用说明

Integrate Microsoft Dataverse into your workflow. Create, read, update, delete, upsert, associate, query, search, and execute actions and functions against Dataverse tables using the Web API. Supports bulk operations, FetchXML, file uploads, and relevance search. Works with Dynamics 365, Power Platform, and custom Dataverse environments.

工具

microsoft_dataverse_associate

Associate two records in Microsoft Dataverse via a navigation property. Creates a relationship between a source record and a target record. Supports both collection-valued (POST) and single-valued (PUT) navigation properties.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Source entity set name (e.g., accounts)
recordIdstring是Source record GUID
navigationPropertystring是Navigation property name (e.g., contact_customer_accounts for collection-valued, or parentcustomerid_account for single-valued)
targetEntitySetNamestring是Target entity set name (e.g., contacts)
targetRecordIdstring是Target record GUID to associate
navigationTypestring否Type of navigation property: "collection" (default, uses POST) or "single" (uses PUT for lookup fields)

输出

参数类型描述
successbooleanWhether the association was created successfully
entitySetNamestringSource entity set name used in the association
recordIdstringSource record GUID that was associated
navigationPropertystringNavigation property used for the association
targetEntitySetNamestringTarget entity set name used in the association
targetRecordIdstringTarget record GUID that was associated

microsoft_dataverse_create_multiple

Create multiple records of the same table type in a single request. Each record in the Targets array must include an @odata.type annotation. Recommended batch size: 100-1000 records for standard tables.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
entityLogicalNamestring是Table logical name for @odata.type annotation (e.g., account, contact). Used to set Microsoft.Dynamics.CRM.{entityLogicalName} on each record.
recordsobject是Array of record objects to create. Each record should contain column logical names as keys. The @odata.type annotation is added automatically.

输出

参数类型描述
idsarrayArray of GUIDs for the created records
countnumberNumber of records created
successbooleanWhether all records were created successfully

microsoft_dataverse_create_record

Create a new record in a Microsoft Dataverse table. Requires the entity set name (plural table name) and record data as a JSON object.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
dataobject是Record data as a JSON object with column names as keys

输出

参数类型描述
recordIdstringThe ID of the created record
recordobjectDataverse record object. Contains dynamic columns based on the queried table, plus OData metadata fields.
successbooleanWhether the record was created successfully

microsoft_dataverse_delete_record

Delete a record from a Microsoft Dataverse table by its ID.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
recordIdstring是The unique identifier (GUID) of the record to delete

输出

参数类型描述
recordIdstringThe ID of the deleted record
successbooleanOperation success status

microsoft_dataverse_disassociate

Remove an association between two records in Microsoft Dataverse. For collection-valued navigation properties, provide the target record ID. For single-valued navigation properties, only the navigation property name is needed.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Source entity set name (e.g., accounts)
recordIdstring是Source record GUID
navigationPropertystring是Navigation property name (e.g., contact_customer_accounts for collection-valued, or parentcustomerid_account for single-valued)
targetRecordIdstring否Target record GUID (required for collection-valued navigation properties, omit for single-valued)

输出

参数类型描述
successbooleanWhether the disassociation was completed successfully
entitySetNamestringSource entity set name used in the disassociation
recordIdstringSource record GUID that was disassociated
navigationPropertystringNavigation property used for the disassociation
targetRecordIdstringTarget record GUID that was disassociated

microsoft_dataverse_download_file

Download a file from a file or image column on a Dataverse record. Returns the file content as a base64-encoded string along with file metadata from response headers.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
recordIdstring是Record GUID to download the file from
fileColumnstring是File or image column logical name (e.g., entityimage, cr_document)

输出

参数类型描述
fileContentstringBase64-encoded file content
fileNamestringName of the downloaded file
fileSizenumberFile size in bytes
mimeTypestringMIME type of the file
successbooleanWhether the file was downloaded successfully

microsoft_dataverse_execute_action

Execute a bound or unbound Dataverse action. Actions perform operations with side effects (e.g., Merge, GrantAccess, SendEmail, QualifyLead). For bound actions, provide the entity set name and record ID.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
actionNamestring是Action name (e.g., Merge, GrantAccess, SendEmail). Do not include the Microsoft.Dynamics.CRM. namespace prefix for unbound actions.
entitySetNamestring否Entity set name for bound actions (e.g., accounts). Leave empty for unbound actions.
recordIdstring否Record GUID for bound actions. Leave empty for unbound or collection-bound actions.
parametersobject否Action parameters as a JSON object. For entity references, include @odata.type annotation (e.g., {"Target": {"@odata.type": "Microsoft.Dynamics.CRM.account", "accountid": "..."}})

输出

参数类型描述
resultobjectAction response data. Structure varies by action. Null for actions that return 204 No Content.
successbooleanWhether the action executed successfully

microsoft_dataverse_execute_function

Execute a bound or unbound Dataverse function. Functions are read-only operations (e.g., RetrievePrincipalAccess, RetrieveTotalRecordCount, InitializeFrom). For bound functions, provide the entity set name and record ID.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
functionNamestring是Function name (e.g., RetrievePrincipalAccess, RetrieveTotalRecordCount). Do not include the Microsoft.Dynamics.CRM. namespace prefix for unbound functions.
entitySetNamestring否Entity set name for bound functions (e.g., systemusers). Leave empty for unbound functions.
recordIdstring否Record GUID for bound functions. Leave empty for unbound functions.
parametersstring否Function parameters as a comma-separated list of name=value pairs for the URL (e.g., "LocalizedStandardName='Pacific Standard Time\

输出

参数类型描述
resultobjectFunction response data. Structure varies by function.
successbooleanWhether the function executed successfully

microsoft_dataverse_fetchxml_query

Execute a FetchXML query against a Microsoft Dataverse table. FetchXML supports aggregation, grouping, linked-entity joins, and complex filtering beyond OData capabilities.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
fetchXmlstring是FetchXML query string. Must include <fetch> root element and <entity> child element matching the table logical name.

输出

参数类型描述
recordsarrayArray of Dataverse records. Each record has dynamic columns based on the table schema.
countnumberNumber of records returned in the current page
fetchXmlPagingCookiestringPaging cookie for retrieving the next page of results
moreRecordsbooleanWhether more records are available beyond the current page
successbooleanOperation success status

microsoft_dataverse_get_record

Retrieve a single record from a Microsoft Dataverse table by its ID. Supports $select and $expand OData query options.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
recordIdstring是The unique identifier (GUID) of the record to retrieve
selectstring否Comma-separated list of columns to return (OData $select)
expandstring否Navigation properties to expand (OData $expand)

输出

参数类型描述
recordobjectDataverse record object. Contains dynamic columns based on the queried table, plus OData metadata fields.
recordIdstringThe record primary key ID (auto-detected from response)
successbooleanWhether the record was retrieved successfully

microsoft_dataverse_list_records

Query and list records from a Microsoft Dataverse table. Supports OData query options for filtering, selecting columns, ordering, and pagination.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
selectstring否Comma-separated list of columns to return (OData $select)
filterstring否OData $filter expression (e.g., statecode eq 0)
orderBystring否OData $orderby expression (e.g., name asc, createdon desc)
topnumber否Maximum number of records to return (OData $top)
expandstring否Navigation properties to expand (OData $expand)
countstring否Set to "true" to include total record count in response (OData $count)

输出

参数类型描述
recordsarrayArray of Dataverse records. Each record has dynamic columns based on the table schema.
countnumberNumber of records returned in the current page
totalCountnumberTotal number of matching records server-side (requires $count=true)
nextLinkstringURL for the next page of results
successbooleanOperation success status

Perform a full-text relevance search across Microsoft Dataverse tables. Requires Dataverse Search to be enabled on the environment. Supports simple and Lucene query syntax.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
searchTermstring是Search text (1-100 chars). Supports simple syntax: + (AND), | (OR), - (NOT), * (wildcard), "exact phrase"
entitiesstring否JSON array of search entity configs. Each object: {"Name":"account","SelectColumns":["name"],"SearchColumns":["name"],"Filter":"statecode eq 0"}
filterstring否Global OData filter applied across all entities (e.g., "createdon gt 2024-01-01")
facetsstring否JSON array of facet specifications (e.g., ["entityname,count:100","ownerid,count:100"])
topnumber否Maximum number of results (default: 50, max: 100)
skipnumber否Number of results to skip for pagination
orderBystring否JSON array of sort expressions (e.g., ["createdon desc"])
searchModestring否Search mode: "any" (default, match any term) or "all" (match all terms)
searchTypestring否Query type: "simple" (default) or "lucene" (enables regex, fuzzy, proximity, boosting)

输出

参数类型描述
resultsarrayArray of search result objects
↳ IdstringRecord GUID
↳ EntityNamestringTable logical name (e.g., account, contact)
↳ ObjectTypeCodenumberEntity type code
↳ AttributesobjectRecord attributes matching the search. Keys are column logical names.
↳ HighlightsobjectHighlighted search matches. Keys are column names, values are arrays of strings with {crmhit}/{/crmhit} markers.
↳ ScorenumberRelevance score for this result
totalCountnumberTotal number of matching records across all tables
countnumberNumber of results returned in this page
facetsobjectFacet results when facets were requested. Keys are facet names, values are arrays of facet value objects with count and value properties.
successbooleanOperation success status

microsoft_dataverse_update_multiple

Update multiple records of the same table type in a single request. Each record must include its primary key. Only include columns that need to be changed. Recommended batch size: 100-1000 records.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
entityLogicalNamestring是Table logical name for @odata.type annotation (e.g., account, contact). Used to set Microsoft.Dynamics.CRM.{entityLogicalName} on each record.
recordsobject是Array of record objects to update. Each record must include its primary key (e.g., accountid) and only the columns being changed. The @odata.type annotation is added automatically.

输出

参数类型描述
successbooleanWhether all records were updated successfully

microsoft_dataverse_update_record

Update an existing record in a Microsoft Dataverse table. Only send the columns you want to change.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
recordIdstring是The unique identifier (GUID) of the record to update
dataobject是Record data to update as a JSON object with column names as keys

输出

参数类型描述
recordIdstringThe ID of the updated record
successbooleanOperation success status

microsoft_dataverse_upload_file

Upload a file to a file or image column on a Dataverse record. Supports single-request upload for files up to 128 MB. The file content must be provided as a base64-encoded string.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
recordIdstring是Record GUID to upload the file to
fileColumnstring是File or image column logical name (e.g., entityimage, cr_document)
fileNamestring是Name of the file being uploaded (e.g., document.pdf)
filefile否File to upload (UserFile object)
fileContentstring否Base64-encoded file content (legacy)

输出

参数类型描述
recordIdstringRecord GUID the file was uploaded to
fileColumnstringFile column the file was uploaded to
fileNamestringName of the uploaded file
successbooleanWhether the file was uploaded successfully

microsoft_dataverse_upsert_record

Create or update a record in a Microsoft Dataverse table. If a record with the given ID exists, it is updated; otherwise, a new record is created.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestring是Entity set name (plural table name, e.g., accounts, contacts)
recordIdstring是The unique identifier (GUID) of the record to upsert
dataobject是Record data as a JSON object with column names as keys

输出

参数类型描述
recordIdstringThe ID of the upserted record
createdbooleanTrue if the record was created, false if updated
recordobjectDataverse record object. Contains dynamic columns based on the queried table, plus OData metadata fields.
successbooleanOperation success status

microsoft_dataverse_whoami

Retrieve the current authenticated user information from Microsoft Dataverse. Useful for testing connectivity and getting the user ID, business unit ID, and organization ID.

输入

参数类型必填描述
environmentUrlstring是Dataverse environment URL (e.g., https://myorg.crm.dynamics.com\)

输出

参数类型描述
userIdstringThe authenticated user ID
businessUnitIdstringThe business unit ID
organizationIdstringThe organization ID
successbooleanOperation success status

On this page