Empowering users in Dynamics CRM is great but one needs to be prepared to troubleshoot adventures of a power user. If you have a rule that locks the field when certain conditions are met, beware what happens when this field is editable. That’s right, the last edit will be lost. Why? because locking the field […]
Tip #368: Keep your early bound classes lean
The convenience of early bound classes often overshadows the side-effects of using those. It is, indeed, very easy to write: CrmSvcUtil.exe /url:https://myorg.api.crm.dynamics.com/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:”myname@live.com” /password:”myp@ssword!” then add generated file to the project and use syntax-checked a.accountname = “Acme Inc” instead of a[“acountname”] = “Acme Inc” (see what I’ve done here to demonstrate the usefulness of […]
Tip #217: Bad Id, bad
Following my anal retentive attention to the tightness of LINQ code and SQL it generates, I decided to refactor an old piece of code that extracted identifiers of the accounts matching certain criteria. Being very smug with all the newly acquired knowledge, I quickly produced an equivalent of: To my horror, this code generated an […]
Tip #215: Computer says ‘no’
Well, this is embarrassing. Remember that flogging I unleashed on unscrupulous developers being disrespectful to LINQ, performance and humanity in general? I was basking in my own cleverness of possessing the knowledge of LINQ operators including magic Any: Yesterday I had a chance to use what I preached and this is what I got in […]
Tip #212: Getting a yes or no answer in LINQ
Say, you need to find out if your organization has any opportunities with the estimated value of more than a million dollars (that’s right, that’s how developers usually roll). No need to retrieve anything, just simple yes or no. There are many ways to accomplish the task, most of them, sadly, are as efficient as […]
Tip #209: Who’s your sister?
When it comes to the coding, not always but often, less means better, faster and more manageable code. I’ve recently come across of someone else’s (could it have been me 4 years ago?) piece of work updating bulk email setting for the contact: Sigh. The “all columns” sin aside, the retrieve is absolutely unnecessary. You […]
Tip #207: Remove password expiration for O365/CRM Online
Password expiration in CRM Online is indeed a nuisance and can be changed but the maximum password expiration period configurable using Office 365 administration portal is 2 years. If you intend to use O365/CRM Online for longer than 2 years, you may want to consider using Powershell tools to do it like a boss. The […]
Tip #171: If email router is having a slow day or how to add custom index
Sometimes things are slow. Very. Slow. So slow that your email router starts spitting dreadful messages: #9628 – An error occurred while delivering the e-mail message with subject “None of your business” in mailbox foo@bar.baz for delivery to https://crm.bar.baz. System.ServiceModel.FaultException`1 [Microsoft.Xrm.Sdk.OrganizationServiceFault]: SQL timeout expired. (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault). If you are on CRM […]
Tip #144: Restrict AD browsing when adding new users
If you are a hosting provider or a security-conscious administrator managing multiple CRM deployments then you’d like to avoid exposing entire Active Directory when user with appropriate permissions clicks New Multiple Users and then opts to browse all trusted domains and groups. There are some unsupported methods as well as supported C# code to achieve […]
Tip #134: How to block click-to-call in CRM
People would like to have an option to switch click-to-call functionality off. Unfortunately, none of the suggestions is going to work. Why? Because this functionality relies on URL protocols skype: (for Skype) and tel: (for Lync). You can try fooling the system by deregistering protocols, fiddling with the registry, disabling addins, blocking addins, directing to […]