Tip #373: Careful with delete button

As it turns out, Spießrutenlaufen is no longer exclusive developers domain and can be equally applied to the customizers. Shan “Smoke ‘em” McArthur reminded all of us (and not for the first time) that it’s not all unicorns and rainbows with managed solutions.

If you ever delete a form for the entity that is part of a managed solution, you will lose that form forever.

he warned the audience.

No matter what you do, no solutions file gymnastics will resurrect the form (apart, of course, from uninstalling the entire solution and importing back the one with the form). At the same time, for unmanaged components, you can just simply reimport the entity with that form included and, presto, the form is back.

he continued.

Hear you. At least in the development world we can switch to one of the earlier commits. I’m glad that now developers have someone to share their appetite for the destructive behavior with.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
Tweet about this on TwitterShare on FacebookShare on Google+

Tip #372: IIS in the middle

Ages ago we had a tip on how to apply IP restrictions to your IFD CRM on-premises deployment. Traditional “this is unsupported” disclaimer followed. There is a way, however, to make it a) supported and b) infinitely more flexible and useful.

Enter Application Request Routing. Basically, the idea is to put a small IIS server as your “front” web server and then use ARR to route requests to the “backend” web server. In this configuration your “front” server does not need to have any CRM components installed at all as its sole purpose is to route requests.

Steps

  1. Configure default web site to listen on 443 with your IFD certificate
  2. Install ARR
  3. Create a server farm in Application Request Routing and add your CRM server to it
  4. Check that proxy is set to passthrough
  5. Make sure external CRM requests are going from your firewall to your “front” server

Well, that was easy. Now, you can

  • Apply IP filtering by tweaking web.config on your “front” server. Since we are not touching CRM installation, we are on the supported side.
  • Add more CRM web servers to the farm and do load balancing that is more flexible than NLB (network load balancing), traditionally used with CRM web servers.
  • Configure URL rewrite and introduce vanity URL for your deployment, e.g. make your internal and external URLs the same; this has been done before but now we are supported as we are not touching CRM servers.
  • Anything else?
VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
Tweet about this on TwitterShare on FacebookShare on Google+

Tip #371: Use your fingers

Here, at eXtremeCRM 2015 Madrid, my good friend Gustaf (not V) Westerlund and I had a privilege of delivering a session with a gloomy name Seven Deadly Sins of CRM Development. That’s right, doom and gloom, and Spießrutenlaufen, all over again. I will come back to the topic in the future but for now I want to talk about one of the demos we run during the presentation.

I opted for an easy way out – walk through The Curse of The Browse Button and be done with illustrating the point. I’m glad I asked though how many people actually use NuGet in their development, because the entire room shot up. Oops, here goes my demo. To save the face I probed the subject of how many people use chocolatey and, lucky me, only one hand showed up.

What is it, you may ask? In a nutshell, it’s a silent command line package installer for Windows, based on NuGet. Why bother using command line to install something that you can do by pointing and clicking? Because it works and it makes you productive.

Want to install .net 4.5.2 developer pack to be able to use latest CRM SDK assemblies? Search for the pack on the internets, download, extract, run the installer, answer wizards questions and watch the paint dry. Or:

  • Open elevated command or Powershell prompt
  • Type clist netfx-4.5.2-devpack, press Enter

Not so long ago I had to reset my Surface and all my beloved programs were removed leaving me with the barebone Windows. Since every now and then I get the list of the installed packages by running clist -localonly, and save the result to to OneDrive, restoring all of them in one go was a breeze.

If you want something more versatile than that to manage repeatable environment builds, have a look at the Boxstarter.

Demo saved, productivity is up, mouse is taking a break.

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
Tweet about this on TwitterShare on FacebookShare on Google+

Tip #369: Booklovers rejoice

To paraphrase Django Unchained:

What is the point of having a website page that speaks CRM books if you can’t wheel ‘em out when you have a CRM book-loving guest?

So, without further ado, a small plug about not so small book where all surviving tipsters left their mark.

2013 CRM Field Guide released – almost 1,000 pages of MVP knowledge!

CRM Field GuideBrought to you by the same team you’ve already learned from in CRM 2013 QuickStart, CRM Mobile Survival Guide and more. As always we bring you internationally recognized CRM experts, all of our authors are current Dynamics CRM MVPs.

The 2013 CRM Field Guide is being released only as an electronic book. There is not a print copy available at this time (and all the surviving trees say thank you).

The CRM Field Guide offers best practices, tips and tricks, step-by-step learning and more. The targeted CRM is CRM 2013, however, much of the content continues forward as you move ahead to CRM 2015 and beyond.

Go to the site, www.crmfieldguide.com, check out the content and, if you like what you see, buy a copy or two. There is a lot of man- and woman- hours went into that book, there is good stuff for everyone.

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
Tweet about this on TwitterShare on FacebookShare on Google+

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 early-bound classes?)

This approach is acceptable if you are writing a Windows app or a command line utiltiy, less desirable if you are working on a portal code and is definitely a Spießrutenlaufen-generating behavior if your responsibility is a plugin. Why? Because the line above will generate over 6MB in raw C# code which will compile to something like 2.8MB assembly. This size maybe OK for a utility or even a web site but dragging all this code into a plugin assembly is definitely not a good idea, especially if you only need a handful of entities (which is usually the case for the plugins).

CRM SDK does provide some paltry information how to control generation process but Eric Pool did the legwork on your behalf 4 years ago. Just follow the article and save both time and megabytes.

The end result? If you only ever need an account entity, restricting class generation to that entity only generates nice and tidy 77KB source file which compiles into a puny 45KB assembly. Now that we can load into a plugin!

The story is almost identical for Windows Phone development where keeping your app size in check is even more critical. On this occasion the CRM team stepped up and produced a ready-to-use project. Of course, mobile development is not only about the size trimming but that’s a story for another day.

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
Tweet about this on TwitterShare on FacebookShare on Google+

Tip #367: New update naming convention

There recently have been some changes to the terminology surrounding CRM updates, update rollups, and service packs. Long term the new naming/numbering scheme will probably be more consistent than saying “CRM 2013 SP1 UR2,” But it may confuse people used to the traditional names.

Update Rollup 1 has just been released for CRM 2015, but it is not called “Update Rollup 1.” It is called “Update .01.”

Since we can’t improve on the way others have explained it, here are the best links on the topics:

The CRM Team Blog has the official announcement of the new naming conventions.

The CRM in the Field Blog also discusses it, and has a great podcast you can download that explains what is new in the new release.

This download page is where you can get Update .01 for CRM server, client, and other pieces.

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
Tweet about this on TwitterShare on FacebookShare on Google+

Tip #366: Updating full name on existing contact records

If you update the name format in CRM system settings, new records created will have the new full name format, but what about existing records?

Screenshot 2015-04-13 21.04.41

The format of the full name will not be updated on existing contacts automatically. To change the format on existing contact records, update something about the name on the existing records. For example, you can use a workflow or an SSIS job to update the first or last name fields with the existing data. After this, the full name will be updated on the existing records.

 

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
Tweet about this on TwitterShare on FacebookShare on Google+

Tip #365: Date field options in CRM Online 2015 Update 1

Welcome to Tip 365. We finally have enough tips to fill a non-leap year page-a-day calendar.

In yesterday’s tip about the release preview guide for the spring release, we mentioned that date only fields were coming. Here is more details about this fantastic feature.

Screenshot 2015-04-13 14.16.07

Update 1 adds a “Behavior” field that determines how the date acts. There are three options:

  • User Local — the way it acts now, where date/time is rendered in the time zone of the viewing user.
  • Date only — as it says, date only, 1/1/2016 is 1/1/2016 in all time zones.
  • Time-zone independent — this is when you want to have a date/time field that is independent of time zones but still have the time. Think reservation systems, where you want it to say 3 PM no matter who is looking at it

So what happens with the system birthdate field? It is now a date only field.

 

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
Tweet about this on TwitterShare on FacebookShare on Google+

Tip #364: Release Preview Guide for CRM Online 2015 Update 1

The Spring 2015 update for CRM Online is coming soon, and last week Microsoft published an updated Release Preview Guide that includes all of the details about the spring release. Download it here.

There’s lots to love about this release, my favorite three are:

  1. New navigation
  2. Date only fields
  3. New tracking options (including smartphones).
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
Tweet about this on TwitterShare on FacebookShare on Google+