Redigera

Dela via


Search data using entity searches in Unified Service Desk

Entity searches are FetchXML definitions that query Microsoft Dataverse web services to return data. You can also use replacement parameters within the FetchXML queries in an entity search. Entity searches can be used in window navigation rules both as a source to access data which is not displayed on the form, and as a destination to look up the data using a web service call to Dataverse, and then populate the Unified Service Desk context data so that it can be used in replacement parameters. You can also use entity searches in the DoSearch action for the Global Manager hosted control to search for your data.

You define an entity search in the Entity Searches area (Settings > Unified Service Desk > Entity Searches) in Dataverse. To define an entity search, you need to specify three things: a name, the entity that the search applies to, and the FetchXML query that represents the query to retrieve data from the server.

The following FetchXML query returns name and address details of an account based on a customer ID available from a case:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">  
  <entity name="account">  
    <attribute name="name" />  
    <attribute name="emailaddress1" />  
    <attribute name="telephone1" />     
    <attribute name="address1_line1" />  
    <attribute name="address1_city" />  
    <attribute name="address1_stateorprovince" />  
    <attribute name="address1_postalcode" />  
   <attribute name="address1_country" />  
   <attribute name="msdyusd_facebook"/>  
   <attribute name="msdyusd_twitter"/>  
    <order attribute="name" descending="false" />  
    <filter type="and">  
      <condition attribute="accountid" operator="eq" value="{[[incident.customerid.Id]x]}" />  
    </filter>  
  </entity>  
</fetch>  

This is how the entity search definition looks like:

Sample entity search definition.

Important

While defining FetchXML queries in an entity search, you should only return the fields that are required for the purpose. This minimizes the impact on the network by limiting the size of the request and the data being returned, thus optimizing the resource usage.

Developers can also reuse an existing entity search definition in their code to search for records in Dataverse. More information: Reuse Entity Search definition in your custom code

See also

Reuse Entity Search definition in your custom code
Use window navigation rules in Unified Service Desk
Action calls
Learn to configure Unified Service Desk
Walkthrough: Use the generic listener adapter for CTI event routing