Michael Philip's Blog

Writing about MS Tech with strong focus on Azure & CRM


Leave a comment

Refresh Page in CRM 203/2015 using Java script

Hello,

Sometimes you may want to refresh the data on the form before/after applying some updates like clicking on a ribbon button which calls an action for example , you can perform this using the following java script line of code

Xrm.Page.data.refresh();

Advertisements


Leave a comment

Disable Caching In CRM Organization Service

MS CRM has caching feature but sometimes you want to disable it to get the latest updates,two ways to disable caching
First way – Configuration

Add the following configuration block to the config file of your application

<configSections>

<sectionname="microsoft.xrm.client"type="Microsoft.Xrm.Client.Configuration.CrmSection, Microsoft.Xrm.Client"/>

</configSections>

<microsoft.xrm.client>

<contexts>

<addname="Xrm"type="Xrm.XrmServiceContext, Xrm"serviceName="Xrm"/>

</contexts>

<services>

<addname="Xrm"type="Microsoft.Xrm.Client.Services.OrganizationService, Microsoft.Xrm.Client"/>

</services>

</microsoft.xrm.client>
Second Way – Pragmatically

Microsoft.Xrm.Client.Caching.ObjectCacheManager.GetInstance().Clear();


1 Comment

How to solve : A proxy type with the name account has been defined by another assembly

The problem is actually with WCF attempting to deserialize the server response and not being able to identify the correct type. The best method to sort this issue is to pass in the current assembly using Assembly.GetExecutingAssembly() to the ProxyTypesBehavior() while creating the proxy like so

using (serviceProxy = new OrganizationServiceProxy(config.OrganizationUri,
config.HomeRealmUri,
config.Credentials,
config.DeviceCredentials))
{
// This statement is required to enable early-bound type support.
serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior(Assembly.GetExecutingAssembly()));
}


Leave a comment

XRM Speed Builder for MS CRM

XRM speedy Tool allows migrating existing applications to CRM in a quick way by providing the following :
Creates custom entities from SQL Server database tables
– Creates attributes from fields from database table fields
– Puts fields on forms.
http://xrmspeedy.codeplex.com/
Thanks to Jason Lattimer for this perfect tool.
Source : http://mileyja.blogspot.com/2012/12/xrm-speed-builder-for-microsoft.html