While working earlier today on a client server (Windows Server 2008 R2) in CRM4, I came across an incredibly annoying issue: I was unable to select a header in a view in order to move or delete it. It turns out, the client machine had IE Enhanced Security Configuration enabled, which was causing this very peculiar bug!
To disable IE ESC:
1) Open up the Server Manager.
2) On the bottom right of the Manager, under Security Information, click "Configure IE ESC".
3) Set both options to Off.
Now that these are disabled, you should be able to select your column headers!
Monday, February 28, 2011
Friday, February 25, 2011
Error Accessing CRM 2011 Online Plugin-Registration Tool
This can be a frustrating error when trying to access CRM 2011 Online via the plugin registration tool:
Luckily, there is a pretty simple fix. Open up your %userprofile%\LiveDeviceID\ folder, and delete LiveDevice.xml (back it up in case something goes wrong!).
Restart the plugin registration tool, and it should now connect properly!
Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
Server stack trace:
at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateLiveIdInternal(ClientCredentials clientCredentials, SecurityTokenResponse deviceToken, String keyType)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateDevice(ClientCredentials clientCredentials)
at Microsoft.Xrm.Sdk.Client.DiscoveryServiceConfiguration.AuthenticateDevice(ClientCredentials clientCredentials)
at PluginRegistrationTool.CrmConnection.get_DiscoveryService() in C:\Projects\CRM 2011 SDK\sdk\tools\pluginregistration\CrmConnection.cs:line 272
at PluginRegistrationTool.CrmConnection.RetrieveOrganizations() in C:\Projects\CRM 2011 SDK\sdk\tools\pluginregistration\CrmConnection.cs:line 367
at PluginRegistrationTool.ConnectionsForm.OpenConnection(CrmConnection con) in C:\Projects\CRM 2011 SDK\sdk\tools\pluginregistration\ConnectionsForm.cs:line 940
Inner Exception: System.ServiceModel.FaultException: Invalid RequestLuckily, there is a pretty simple fix. Open up your %userprofile%\LiveDeviceID\ folder, and delete LiveDevice.xml (back it up in case something goes wrong!).
Restart the plugin registration tool, and it should now connect properly!
Monday, January 24, 2011
Javascript & Read-Only Picklists
So you've got this great bit of Javascript that changes a read-only picklist field. Great! The only problem is, when the code fires on an update form, the picklist that you set doesn't get saved! It'll work on create, so whats the deal?
What you need to do is go back into your Javascript and enable the "ForceSubmit" attribute of the picklist. For example (from CRM 2011, changing one picklist based on the value of another picklist onchange):
function CheckType() {
if(crmForm.all.new_type.DataValue == 100000001) {
crmForm.all.new_readonlypicklist.DataValue = 100000001;
crmForm.all.new_readonlypicklist.ForceSubmit = true;
}
}
Your picklist field should now update and save properly!
What you need to do is go back into your Javascript and enable the "ForceSubmit" attribute of the picklist. For example (from CRM 2011, changing one picklist based on the value of another picklist onchange):
function CheckType() {
if(crmForm.all.new_type.DataValue == 100000001) {
crmForm.all.new_readonlypicklist.DataValue = 100000001;
crmForm.all.new_readonlypicklist.ForceSubmit = true;
}
}
Your picklist field should now update and save properly!
Sunday, January 23, 2011
Simple CRM FetchXML in C#
Need to use some FetchXML in C# to pull some data? Normally you would have to write your FetchXML, then worry about paging since you may have more than 5,000 records. Luckily, there's an easy way to speed up both of these processes.
Use this tip from Rockstar Bits & Ronald Lemmen to generate your FetchXML automatically from an advanced find:
http://rockstarbits.blogspot.com/2010/02/using-advanced-find-to-generate.html
Next, use this sample from Phil's CRM Blog which gets rid of the paging hassle:
http://blog.expertsoftware.co.uk/post/2009/03/19/Retrieving-All-Records-with-Fetch-XML.aspx
Now that you've got your results, load them into an XmlDocument for parsing and away you go!
Use this tip from Rockstar Bits & Ronald Lemmen to generate your FetchXML automatically from an advanced find:
http://rockstarbits.blogspot.com/2010/02/using-advanced-find-to-generate.html
Next, use this sample from Phil's CRM Blog which gets rid of the paging hassle:
http://blog.expertsoftware.co.uk/post/2009/03/19/Retrieving-All-Records-with-Fetch-XML.aspx
Now that you've got your results, load them into an XmlDocument for parsing and away you go!
Subscribe to:
Posts (Atom)