Posts

Showing posts from July, 2017

Dynamics 365 sub-grid add new and add existing

Image
In Dynamics 365, if you put a sub-grid to display related records in a parent, there is always a plus (+) sign to allow user either adding a new child record or an existing record. The default behavior when user clicks the plus (+) sign is to display a lookup box, user can then click the lookup to drop down a list of child records or click the New button at the bottom of the drop down list. However, sometimes we may want to force the plus (+) sign to open the new record form straight away without displaying the lookup drop down to users. For example, we have a parent entity called Project, which is a custom entity. And we create a second custom entity called Service Contract, which has N to 1 relationship to Project. The project form looks like below. For the purpose of the demo, we say the requirement is to always open the new service contract form when user clicks the plus (+) sign. The easiest way to do this is to change the Project lookup field in the Service Con...

Dynamics 365 SDK Metadata Diagram Tool

I needed to document the as-built data model (entities, attributes and relationships) for customer's Dynamics 365 implementation and thought I should give the metadata diagram tool that comes with SDK a go ... The metadata diagram tool has been around quite sometime, it is located at: SDK\SampleCode\CS\Metadata\Diagram It seems like the solution hasn't been updated for quite sometime, and it is still trying to connect to the 2011 organization web service to get the organization service proxy object. And during my initial testing, it couldn't connect to Dynamics 365 instance (8.2). So I had to modify the code a bit to get it to work. Here is what you need to do: Open the solution in Visual Studio, I am using 2015. Restore the NuGet packages, and upgrade to the latest version of the packages. Also download and install the Microsoft.CrmSdk.XrmTooling.CoreAssembly NuGet package, the solution will eventually has the following packages installed. <packages>  ...