“Does not contain data” filter in Advanced Find in Dynamics 365 July 2017 Update

With July 2017 Update in Dynamics 365, Advanced Find view now supports Does Not Contain Data filter for related record.

So basically, we can now write a query like “Find all the lead records which doesn’t contain any related task”. However, we cannot define any filter conditions for the related record though.

The other interesting thing that we observed that in the case of N – N relationships it throws exception.

For e.g. if we want to find all the contacts that are not associated to marketing list

We get the following exception à

Also,

The does not contain data filter isn’t available while defining marketing list members in marketing list.

Hope it helps..

Incorrect attribute value type System.String in Dynamics 365 (CRM)

We were getting the below error while creating an entity record through a C# Console Application.

This occurred because the code was trying to set string value to one of the decimal type field.

Parsing the string value to decimal and then setting it fixed it.

Hope it helps

MultiSelect Option Set in Dynamics 365

With July 2017 update, we can now finally create multi-select option set in Dynamics 365.

We can also use Existing Global Option Set while defining our Multi Select Option set.

This is how control looks within the form.

Within Advanced Find View

We can use the existing option set client-side methods on Multi Select Option Set.

https://msdn.microsoft.com/en-us/library/gg334409.aspx#Anchor_1

getSelectedOption() – for new_weekday multiselect option-set with value Thursday and Friday selected –

Hope it helps..

Unified Interface – Dynamics 365

Unified Interface – Dynamics 365 July 2017 Update

Matthew's Dynamics 365 Blog

This is my second blog relating to new features with the Spring Release of Dynamics 365 (July 2017).

Please note any pictures are taken from the Dynamics 365 Preview Executive Briefing which can be found at the following link (by CRM Innovation). All information contained in this blog is a summary of two presentations across the three days of the briefing – there is still a lot of unknowns at this point so please bear with me!

Accessing Dynamics 365 – the current Interfaces

Dynamics 365 as we currently know it – Microsoft allows us to access our Dynamics 365 data via the following (out of the box) methods:

View original post 835 more words

Configuring Virtual Entity in Dynamics 365

Virtual Entity is a new featured introduced in July 2017 Update of Dynamics 365. With Virtual Entity, we can get the data from the external data source, to show inside Dynamics 365 easily with simple configuration. Earlier to achieve the same we need to write custom code to read that data or need to save that data inside Dynamics 365. With Virtual Entity, the data is still residing in the source system.

Few points to consider while using Virtual Entity are

  • They are read only.

  • They don’t support audit or duplicate detection, can’t be of activity type, are organization owned but doesn’t support the Dynamic’s security model, no BPF etc.

To configure the Virtual Entity,

  1. We need to define a Virtual Entity Data Source, currently it only supports OData V4 Data Provider.
  2. Create a new custom Entity of type Virtual Entity, specifying External Name and External Collection Name corresponding to the name of the entity and entity set in the OData service to connect to.
  3. Set the Id and Name attributes (or any custom attribute) of the Virtual Entity to the corresponding fields of OData entity.
  4. Id (Primary Key) field must be of type GUID else we will get the exception.

To begin with, let us first create a OData V4 service.

1) Open Visual Studio, create a new ASP.NET Web Application project with Empty Template of type Web API.

Add a new Model class of type Person

 public class Person
{
public string ID { get; set; }
public String Name { get; set; }
public String Description { get; set; }
}

 

Add a new Sample Data Source as shown below.

 public class SampleDataSource
{
private static SampleDataSource instance = null;
public static SampleDataSource Instance
{
get
{
if (instance == null)
{
instance = new SampleDataSource();
}
return instance;
}
}
public List<Person> Persons { get; set; }

private SampleDataSource()
{
this.Reset();
this.Initialize();
}
public void Reset()
{
this.Persons = new List<Person>();
}
public void Initialize()
{
this.Persons.AddRange(new List<Person>
{
new Person()
{
ID = "testID1",
Name = "Person 1",
Description = "Person 1 Description"

},
new Person()
{

ID = "testID2",
Name = "Person 2",
Description = "Person 2 Description"
},
new Person()
{
ID ="3920A281-E6A8-48FF-B119-5873C63B434A",
Name = "Person 3",
Description = "Person 3 Description"
}
});
}
}

 

Add a new controller as shown below.

 [EnableQuery]
public class PersonsController : ODataController
{
public IHttpActionResult Get()
{
return Ok(SampleDataSource.Instance.Persons.AsQueryable());
}
}

 

Update WebApiConfig.cs as shown below

 public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.MapODataServiceRoute("odata", null, GetEdmModel(), new DefaultODataBatchHandler(GlobalConfiguration.DefaultServer));
config.Count().Filter().OrderBy().Expand().Select().MaxTop(null);
config.EnsureInitialized();
}
private static IEdmModel GetEdmModel()
{
ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
builder.Namespace = "Sample";
builder.ContainerName = "DefaultContainer";
builder.EntitySet<Person>("Persons");
var edmModel = builder.GetEdmModel();
return edmModel;
}
}

Here we have published it as Microsoft Azure Web Apps.Note down the Entity Type Name and the EntitySet  Name. Here the ID field is of type GUID.

Inside Dynamics 365, go to Settings à Administration click on Virtual Entity Data Sources.

Click on New to create a new Data Source, OData V4 Data Provider is the only provider available currently.

Specify the URL of the OData Service and other values and save the record.

Create a new Virtual Entity, and specify the Entity and EntitySet for External Name and External Collection Name property respectively.

This creates an id and name field for the entity. Open those fields and map them to the corresponding field of the Entity defined in OData. Similarly, we can create a new field (new_description) and map it to the corresponding field inside OData Entity as shown below.

Publish the changes.

To see it in action, open Advanced Find View and search against the Person entity.

Hope it helps..

New View Designer inside App Designer in Dynamics 365 July Update

The Dynamics 365 July Update new includes a new View Designer.

It includes the drag and drop capabilities for adding columns from Primary or Related Entity.

Filter Criteria, Sorting and Column Properties can be defined in the same designer canvas without having to open a new window for that.

Filter Criteria :

Setting sorting and column properties.

Hope it helps..