Monday, April 6, 2015

Microsoft Dynamics CRM - Fields Could Not Be Found

I'm creating a plugin to a new instance and I was stuck in a problem, were a lot of fields (as per the error) are missing. See the figure below.


Problem:
All fields mentioned in the image above, are OptionSets. The compiler for some reason, could not find the definition of the fields above but when you check the entity, the fields does exist. 
Solution:
I notice first, that all OptionSet above does not have any value.
Option 1 - since this is a new instance and no value is present in the OptionSet, you can comment the error. However you need to comment again if you need to regenerate a fresh early-bound classes.
Option 2 - assigned at least one value to the OptionSets.
I regenerated the early-bound classes and recompile and all the errors are gone.

I hope this helps.

Monday, March 9, 2015

Microsoft Dynamics CRM Additional Instance or Sandbox

I have a project where we are required to have a seperated development instance/sandbox.

The details below will guide you on how to add an additional instance or sandbox to the current Dynamics CRM instance.

How to add a "Sandbox" instance.

1.) Login to "portal.microsoftonline.com" using O365 account.
2.) Identify your current Dynamics CRM subscription.
-> Click "Purchase Services"
-> Click "view current subscription". See figure  below.

3.) Search your subscription in the list of plans on the same page.
-> Click "Add More". See figure below.


4.) notice that "Additional Non-Production" instance item. See figure below.

5.) You may proceed to add an additional instance or sandbox.

References:
http://www.microsoft.com/en-us/dynamics/crm.aspx
https://technet.microsoft.com/en-us/library/dn467371.aspx
https://technet.microsoft.com/en-us/library/dn659833.aspx

Sunday, January 11, 2015

Dynamics CRM 2013 - Create Dependent OptionSets (Picklist)

There is a requirement in my project to have 3 tier field dependency where I use the solution discussed in MSDN, click here.

However, despite I followed the exact instructions, my setup did not work.

The issue is in Step 4. My web resource is not loading because I've specified the "filename".

In the Onload event for the form, configure the event handler to call the SDK.DependentOptionSet.init function and pass in the name of the XML web resource as a parameter. Use the field on the Handler Properties dialog box to enter: "sample_TicketDependentOptionSetConfig.xml" into the field Comma separated list of parameters that will be passed to the function.

Instead of using the "filename" [sample_TicketDependentOptionSetConfig.xml], you should use the "name" of the resource i.e. "new_ticketdependentOptionSet".



To check, view the web resource if its loaded in the browsers developers tool.

Sunday, December 14, 2014

Dynamics CRM 2013 - Multiple Request

Have you ever wonder how does the multiple "Multiple Request (create/update/delete) Object" is working in the background?

The image below show's the captured "Multiple Request" (1000 request) traffic to update an attribute on top of current CRM context in one invoke of "SaveChanges" method.


Thursday, December 11, 2014

Dynamics CRM 2013 - Activity Custom Field

Issue: 

So there is a requirement for our Dynamics CRM Online instance to house the list of Activities from the previous system.

However, the Activities from the previous system has more fields.

This is when I discovered, custom field to Activity entity is not possible as of this writing.

Solution

Is to create a "custom entity" derive from Activity entity. Using this custom entity, you can introduce new field.

Tuesday, December 9, 2014

Dynamics CRM 2013 - Plugin Registration Timeout

I just encountered a timeout when I tried to register my plugin via Plugin Registration Tool (included in the SDK) and the "Deploy" action in Visual Studio.

Here are the few things I found out in this situation:
  1. The Plugin Registration Tool and Visual Studio Deploy feature timeout is set to 2 minutes. Therefore, if you have a slow internet connection and considerable big dll to register, you might encounter this error.
  2. The dll output of my plugin is almost 4MB. It is huge file when you consider, I only use 4 early bound classes. In my case, all the classes are defined only in one file.
  3. Using Early Bound classes and creating a class in file won't cut it. Why? Because of relationships, basically you have to include "most" of them, in order for you to use the 4 classes (or the few classes you'll need).
There are two solution in this situation.
  1. First, (has more benefit in my opinion), is to stick in using early bound classes, and just find a fast internet connection.
  2. Second (more work/effort), is to take advantage of late bound classes which will eliminate the huge dll size output of your plugin.
I could not wait to go to the office tomorrow.

Update

After going to our office, having a fast internet resolve my issue when trying to register the tool.


Decode URL with confidence

Yesterday, while configuring a Unified Service Desk to automatically display a dashboard, I need to obtain the Dashboard GUID. The fi...