Friday, September 15, 2017

Unable to Login to Dynamics CRMOrganizationServiceProxy is null

Dlls Required:
Microsoft.Xrm.Tooling.Connector.dll

CRM connection code:
string connectionString = ConfigurationManager.ConnectionStrings["CRM"].ConnectionString;

CrmServiceClient client = new CrmServiceClient(connectionString);


Connection String:
<add name="CRM" connectionString="AuthType=Office365;Username=myid@mydomain.com; Password=mypassword;Url=https://organiationuniquename.crm.dynamics.com"/>


That’s it, this is the piece of code required to connect CRM online through SDK. But the error "Unable to Login to Dynamics CRMOrganizationServiceProxy is null" sometimes can kill good amount of time. Below are the some suggestion which can resolve and saves someone's hours of time.

1. Check your connection string.
2. You should use unique name of organization in connection string. You can find unique name in              Settings->Customizations->Developer Resources







3. something wrong with credentials you are using. Try using service credentials.
4. Double check which version of dlls you are using.
5. Install the right version of dlls through nuget packages










6. There may something wrong with network, try using different network preferably try to test in client network itself
7.     And, include below tag in app.config or web.config
<system.net>
  <defaultProxy useDefaultCredentials="true"></defaultProxy>
</system.net>

Let me know which point helps you most.

Happy coding.



Friday, August 18, 2017

Dynamics 365 editable grid limitations

1. Logic we have implemented on update or create form will not work automatically on editable grid. We should configure explicitly for editable grid.
2. Editable grid works on execution context, we can set or clear notifications of controls under selected row.
3. Save in editable grid works bit differently than normal save method. EventArgs of save method in editable grid is null, hence we cannot stop the save execution in middle. But we can stop the save in update form through eventargs.
4. Group By - by default value is null, user have to select the group by value initially. We cannot set through code.
5. When we are using same javascript file for both editable grid and normal form, I did observer file is loading twice in browser with different case.

Monday, August 29, 2016

Minimum Privileges required to access MS CRM

When signing in to Microsoft Dynamics CRM:

1. To render the home page, assign the following privileges on the Customization tab: Read Web
Resource, Read Customizations.

2. To render an entity grid (that is, to view lists of records and other data): Read privilege on the entity, Read User Settings on the Business Management tab, and Read View on the Customization tab.

3. To view single entities in detail: Read privilege on the entity, Read System Form on the Customization tab, Create and Read User Entity UI Settings on the Core Records tab. 

Owner Team Vs Access Team in MS CRM

Owner Team:


1. We can grant security roles to owner teams.
2. Owner Team owns the record, i.e Owner field of each record will be filled with the team.
3. Need to be created manually or programmatically created and managed.
4. Will be cached in Dynamics CRM Server when user accesses application.
5. Can act as a resource in service scheduling.


Access Team;

1. We cannot grant security roles to access teams.
2. It cannot own any records.
3. Won't be displayed in most team views.
4. Can be system managed, directly from the form of the record that it relates to
5. Won't be cached as it doesn't derive privilege or ownership checks
6. Can't be scheduled as a resource in service scheduling

Tuesday, May 3, 2016

Things you might not know about solutions in MS CRM

Though we are working with the system very closely, certainly there are few things which we might not know.

Here I would like to give few important points related to solutions.


  • You can’t export your default solution as a managed solution
  • MS CRM don’t support importing a default solution taken from an on-premise deployment into a CRM Online organization or a default solution taken from a CRM Online organization into an on-premises deployment. MS CRM do support importing custom solutions between these deployment types, but not default solutions
  • When you export a managed solution, you can’t import it back into the organization it was imported from
  • All imported security roles will be attached to the root business unit
  • If you import customizations that include a language that is not installed on your system, any labels defined in the customizations will default to the base language of the Microsoft Dynamics CRM system the customizations were imported from.

These are very interesting points I came to know when I gone through MS CRM adminstration guide. Please comment if I miss any so that those points will be added to the list.

Monday, May 2, 2016

Minimum privileges for common tasks in MS CRM

1. When logging in to Microsoft Dynamics CRM:


  • To render the home page, assign the following privileges on the Customization tab: Read Web Resource, Read Customizations
  • To render an entity grid (that is, to view lists of records and other data): Read privilege on the entity, Read User Settings on the Business Management tab, and Read View on the Customization tab
  • To view single entities in detail: Read privilege on the entity, Read System Form on the Customization tab, Create and Read User Entity UI Settings on the Core Records tab

2. When logging in to Dynamics CRM for Outlook:

  • To render navigation for Microsoft Dynamics CRM and all Microsoft Dynamics CRM buttons: Read Entity and Read View on the Customizations tab
  • To render an entity grid: Read privilege on the entity, Read Customizations and Read Web Resource on the Customization tab, and Read Saved View on the Core Records tab
  • To render entities: Read privilege on the entity, Read System Form on the Customization tab, and Create, Read, and Write User Entity UI Settings on the Core Records tab

Tuesday, March 8, 2016

Paging with FetchXML

In MS CRM 2016 on-premises and online, fetchXML came up with a new attribute called “page”. Using this attribute we can set which page results we want.

<fetch mapping="logical" page="1" count="2">
 <entity name="account">
  <attribute name="accountid" />
  <attribute name="name" />
  <order attribute="name" />
 </entity>

</fetch>

Above query set query for accounts and limit the number of entities to 2 and return just the first page.