Had the need today to backup some report definitions from a SQL Server Reporting Services 2005 Server prior to terminating it. I've linked and put it in pastebin as well.
it doesn't matter....
Still just rocking two monitors? Check out my post on adding a third monitor to your laptop based workstation.
Monday, April 29, 2013
Friday, April 19, 2013
CRM 2011: Mass Update Opportunity Estimated Closed Date
Today, I fielded a request from a collegue who was attempting to update large number of opportunities with the Bulk Edit feature. They were attempting to update the "Estimated Close Date" field.
I noticed what they had as well -- in the bulk edit form the field was disabled. I presume this is because behind the facade, this is a calculated field.
There's a quick and easy way to overcome this problem if you run into it. A simple dialog (or workflow) can still manipulate this field. The former can even be constucted so it prompts for a value.
I've included a screenshot tour of the dialog I constructed below:
I noticed what they had as well -- in the bulk edit form the field was disabled. I presume this is because behind the facade, this is a calculated field.
There's a quick and easy way to overcome this problem if you run into it. A simple dialog (or workflow) can still manipulate this field. The former can even be constucted so it prompts for a value.
I've included a screenshot tour of the dialog I constructed below:
Saturday, March 16, 2013
CRM 2011: Whole Number fields -- dropping the comma
I fielded a request today that involved a CRM field that was configured as a whole number that's intended to store the year component of a date. In the installation of CRM that I was working in -- numerics are formatted with commas.
The problem that the requestor wanted resolved was that 1995 was appearing in the UI as 1,995 -- they wanted to drop the comma.
I ran across a simple javascript one-liner here that solved the problem.
The author was quick to point out that the resolution would likely be consider unsupported. While this is true -- I approach these with a measured risk mentality. It worked for me.
The problem that the requestor wanted resolved was that 1995 was appearing in the UI as 1,995 -- they wanted to drop the comma.
I ran across a simple javascript one-liner here that solved the problem.
document.getElementById("fieldname").value = Xrm.Page.data.entity.attributes.get("fieldname").getValue();
The author was quick to point out that the resolution would likely be consider unsupported. While this is true -- I approach these with a measured risk mentality. It worked for me.
Labels:
CRM,
CRM2011,
SOC coding VMWare
Wednesday, March 13, 2013
Three monitor Setup for a Laptop
I've had a three monitor laptop setup for a while now. With laptops (and some desktops) these days a two monitor setup is pretty much a given. But I wanted more -- so I found a way to make it happen. Some people in the office had taken notice and asked me how I do it. Not wanting to repeat myself -- I opted to share by writing it up. [Links to the product I used is at the bottom of the page]
Goals and Values:
- [High] More Screen Real Estate!
- [High] Prefer Laptop vs Desktop
- [Medium] Affordable: Under $100
- [Medium] Simple
- [Low] Video Performance
- [Low] Portable
- [Low] Scalable
- [Low] Cross Platform
More Screen Real Estate -- What's your number?
I do a fair amount of my work with web technologies as a developer. So that means I usually have one screen dedicated to an editor. (That's one). Particularly with web development its fashionable to have a browser on another screen for testing changes (That's two). Because I work in technology, just about everything requires some reference. It might be a book. It might be specs. It might be documentation. But I usually need to reference something while I do whatever I do (Ideally, thats three). There's lots of different potential uses for three screens -- Browser-Document-Email, Browser-Browser-Browser, Browser-Editor-Terminal, Terminal-Terminal-Browser the permutations are endless.
The trouble I found was that the company I work for purchases commodity laptops -- good, but nothing really special. Like most laptops, these provided a feature that has been available to most mainstream laptops for years -- provide output to two panels. But I wanted more.
Profile Preference: Laptop
I also still wanted a laptop. Desktops could add support for more monitors by just adding more video cards. And that's great -- I still wanted to take my show on the road. You don't have the same options for expansion in a laptop that you do in desktops. But, you do have USB on a laptop....
What I got
I started searching about two years ago for a USB "video card". There's some options in this space. After some debate -- I ended up selecting the Pluggable UGA Adapter. Basically, its a small box (like credit card dimensions) that plugs into your PC with USB. On the other end of it, it has DVI-D to plug into a monitor. I recieved several DVI adapters (to HDMI or VGA) with the package. To any of the Window Management utilities -- it just looks like another display. I've used a few -- Dexpot, Winsplit Revolution and they work fine.
Simple
This thing is simple. When plugged into my Windows 7 laptop, the device initiates the install of a driver pack and once installed appears on your machine like any other display. After that all you need to do is plug it in. If its there the display works, if its not -- it doesn't. I've had to contend a little with different multi-monitor configurations between work and home. I really haven't found a great deal of pain managing the two configurations. In fact, it really seems like Windows 7 keeps track of the make up of the setups and does a fairly good job keeping them straight. A person could always opt to make the setups identical. That's valuable but not always practical -- I like that the DisplayLink and Windows 7 make it just work.
I panicked a little when the company I work for issued new laptops. I couldn't remember where the driver disk was. I've heard horror stories of driver websites evaporating -- especially for niche manucaturers. No worries. I just plugged in the adapter to the PC via USB. The driver bootstrapped itself and checked for and installed updates. Completely painless.
I also appreciate the manufacturer's choice not to bloat the install. There's no crapware in sight. Just enough to register the adapter as another display to the OS. There's just a tray icon mostly for checking for driver updates.
Pixel Perfection: Not Required
The Pluggable Adapter is great -- and it does exactly what I need it for. But its not a video card in the truest sense. You shouldn't expect it to perform well in cases that require a large number of pixels to change very quickly. So, what does that mean exactly? Basically, Full Screen Motion video on large displays. I generally drive a smaller display -- usually a 19" -- and I've watched YouTube and other streaming sources on it. This tends to be windowed for me and it still works pretty well, but I would expect HD video on larger displays won't look as nice on displays driven by this adapter. It'll work just fine on the "native" panels, but the Pluggable Adapter just doesn't have the pixel bandwidth to do a really good job here. Not a dealbreaker for me -- but might be for others. Gamers will also likely be disappointed. I've never really tried PC gaming with this adapter, but for all the reasons mentioned above it probably isn't going to perform the best in those scenarios.
Portable
When I was looking -- I wasn't expressly looking for something portable. I was really only focused on getting a really good work setup. But, the Pluggable Adapter is very portable. Its smaller than my portable mouse. I throw it in my bag every day and its a part of my start up and shutdown each day. At the price point it sells at many could justify owning two. But if I was in a position to own two I'd be looking to drive a fourth panel.
Scaling it up
Though I haven't used the adapter this way, I understand that multiple adapters can be purchased and installed on a single PC. This was a nice added benefit to know that when I wanted that fourth (fifth?) display it is achievable with the same solution. In fact the sales page claims up to 6 displays are possible on Windows. It more than what I need -- but nice to know.
Cross Platform
Most of my computing life is in Windows -- and all of my experience here is reflective of that. Good experience. I do on occasion work on non-Windows OS at home. I was encouraged to see some driver support for these platforms as well if the occasional became something more. Not something I was looking for -- nice to know there is at least some support.
Summing up
If you want something is simple, portable, and affordable to drive some extra monitors in your setup -- give the Plugable display adapters a try. For best results, use the adapters on your smallest display and use it for cases where motion video is rare. I bought it to expand the screen real estate for a laptop, but it works just fine for desktops as well.
Thursday, November 29, 2012
Unit Testing Long Running Workflows by Mocking the TimerExtension
Problem
I've been teaching myself more about .Net Workflow Foundation (WF). One thing I've been working on recently is how to unit test long running workflows. I have a few examples of workflows that delay for days. I'd love to be able to advance the clock and simulate what will happen when time advances past the delay without the wait. There's a number of techniques out there that I have found. They fall into one of several camps.- Roll your own Delay Activity
- Use the custom Delay Activity from Microsoft.Activities.UnitTesting
- Runtime XAMLInjection of modified Delay Timespan
None of these appeal to me. I prefer the stock Delay Activity -- other than unit testing I have no real reason for modified behavior. Runtime injection seems a bit of a kludge. I prefer to leave the logic of the workflow intact and only modify the dependencies from the outside. In short, I have the same concern that is raised in this StackOverflow question about replacing the DurableTimerExtension.
I have the same interest as the original poster of this question. How do I inject my own mocked variation of DateTime.Now()? There are simlar, non-workflow implementations for Mocking DateTime.Now() and UnitTesting DateTime.Now(), just not a best practice for WF.
Here is one way to do it.
[Disclamer: The code I have below uses the Microsoft.Activities.UnitTesting extensions. This technique wouldn't require that framework -- but its handy enough. So I use it.]
Approach
On instances of WorkFlowApplication and WorkflowServiceHost there is an Extensions collection. In WF, this is way to register workflow extensions like Tracking, PersistenceParticipants, and services that your custom Activities can consume. One of the methods on this collection is AddCode @ Pastebin
Conclusion
This isn't quite the ideal in my mind. I'm intercepting the call that the Delay Activity (and anything else that wants to use the TimerExtension) makes to schedule a timer to fire and modifying the actual timespan that is used to schedule the timer. Any workflows that attempt to reconcile time inside and outside of the workflow will have side effects... but, well, that's kinda the point.I'd much rather intercept a request to an imaginary service from the workflow for "What time is it now?". A default (and production implementation would reply "Why its DateTime.Now(), of course [or is that UTCNow()..], A mocked implementation would reply "Its DateTime.Now().Add(new Timespan(0,15,0)) [15 minutes in the future for the less initiated].
All of these techniques have their warts. In any case, what I have written up is the closest to satifying my needs -- so I decided to write up a post for the benefit of all -- including future me. I'd love to hear of other successful approaches you might have taken in the comments.
Wednesday, December 21, 2011
CRM2011 Entity Form Navigation items -- Sending Params
Recently a colleague needed to add a navigational item on the left nav of an entity form. No big deal right? CRM2011 has made this a relatively trivial "configure-it-through-the-ui" capability. But this requirement had a hang up. We were trying to pass form-level parameters to the target url similar to what one can do with IFRAME integrations in CRM. This could be accomplished in prior releases of CRM (3/4) by exporting ISV.config doing some modest editing and then importing the customization.
Why not use an IFRAME?
Good question. File this one under constraints. We have similar capability on the left nav already that we carried over from CRM 4. We really wanted to locate the features near each other -- and the entity form we're working with was already pretty tall.
I found a handful of links that suggested using a form.onload script and modifying the link via the DOM. Or modifying the onclick behavior. These might work too -- but something that I observed while doing ribbon development gave me some hope. Here is a summary what I did and what I found.
*** Disclaimer: You just found this on some random blog. Be smart. Backup, create a new test CRM Org. Test it outside of Production. No warranties, expressed or implied.***
Publish after successful import. That's it. Verify using Fiddler. Good luck.
Why not use an IFRAME?
Good question. File this one under constraints. We have similar capability on the left nav already that we carried over from CRM 4. We really wanted to locate the features near each other -- and the entity form we're working with was already pretty tall.
I found a handful of links that suggested using a form.onload script and modifying the link via the DOM. Or modifying the onclick behavior. These might work too -- but something that I observed while doing ribbon development gave me some hope. Here is a summary what I did and what I found.
*** Disclaimer: You just found this on some random blog. Be smart. Backup, create a new test CRM Org. Test it outside of Production. No warranties, expressed or implied.***
- Create a "seed" navItem through the traditional, supported way. (Customize form, navigation..)
- Create an Unmanaged solution
- Include the entity in question
- Export the Solution
- Unzip the Solution Package
- Open the customizations.xml file in a text editor
- Search for "FormXML"
- once found, search for the name of your link (by display name is fine)
- You'll see something that resembles the following:
- The "PassParams" attribute is what I added.
- Zip up the assets that made up the original exported solution -- especially the modified customizations.xml
- Import this package into CRM2011 through the traditional Settings>>Solutions feature
Publish after successful import. That's it. Verify using Fiddler. Good luck.
Tuesday, January 11, 2011
CRM: Making fields required without being "required"
I ran into a set of requirements recently that called for a CRM field to be required for data entry, but not expressly required for workflow. Here's a Javascript quickie that sets the field requirement level -- just drop in the associated entities Form.Onload ScriptBlock. Not sure what makes something business recommended (the blue askerisk)... but this is a good start
crmForm.SetFieldReqLevel("statecode", 1);
1 = Required
0 = Not Required
2? = Recommended
crmForm.SetFieldReqLevel("statecode", 1);
1 = Required
0 = Not Required
2? = Recommended
Thursday, April 1, 2010
A couple cool things: Mercurial and Moq
Just want to highlight a couple recent interests dev-wise
One is Mercurial.
Its Version control -- which is usually quite boring. Really, I guess its a DVCS (D=Distributed) Like git, but then not. I'm loading it in my head. DVCS tools are what all the cool kids seem to be playing with. I had peeked at git before -- not impressed at the time. More accurately -- I probably just wasn't ready for it. I'd done the SVN for some time. This seems better. Something that helped tip me was this article by Joel Spolsky of Joel on Software fame. A big takeaway that I had was that it makes branching and more importantly merging -- two things that tend to give developers panic attacks -- really pretty easy and painless. I'm all for that.
The other is Moq
Its a "Mocking" framework. The Dev Term. I've tinkered with a few -- and mostly just ran away scared at the prospect. It used to be -- doing mocking was really hard to do... something to be endured. Now I find it oddly not that. Moq helped that for me.
Nothing much more profound. Just sharing things that I'm finding helpful.
One is Mercurial.
Its Version control -- which is usually quite boring. Really, I guess its a DVCS (D=Distributed) Like git, but then not. I'm loading it in my head. DVCS tools are what all the cool kids seem to be playing with. I had peeked at git before -- not impressed at the time. More accurately -- I probably just wasn't ready for it. I'd done the SVN for some time. This seems better. Something that helped tip me was this article by Joel Spolsky of Joel on Software fame. A big takeaway that I had was that it makes branching and more importantly merging -- two things that tend to give developers panic attacks -- really pretty easy and painless. I'm all for that.
The other is Moq
Its a "Mocking" framework. The Dev Term. I've tinkered with a few -- and mostly just ran away scared at the prospect. It used to be -- doing mocking was really hard to do... something to be endured. Now I find it oddly not that. Moq helped that for me.
Nothing much more profound. Just sharing things that I'm finding helpful.
Saturday, February 6, 2010
Dynamics Great Plains -- not a fan
Really not a fan of GP lately. Which is OK most of the time. I keep it at arms length. In my current line of work I usually don't have to work with it much, but I've got a project that calls for some data integration with another vended package. That's fine... and, its working... but it's a mighty struggle.
Most of this frustration is with the data model -- since my project revolves around data integration. My biggest gripe here is the relatively opaque naming structure. This gets easier if you get a tool to help you find some blogs (one in particular) that describe the inner meanings of what the PM30600 table has in it... or if you were looking for vendor names -- what table that would possibly be in. (its PM00200 btw).
I've really, really gotten too used to more declaritive data models with names like "Customer" or "Contact" or "User" or "Activity". And when you deal with, say, invoices -- that ALL of the invoices are in ONE table. Not true, friend. Not in GP. There's like three. And where the invoice appears depends on how far its gotten in the work stream (entered, posted and/or partially paid, paid / history). I'm smart enough to suspect there's probably a really good reason for this, or dumb enough to believe that someone smart designed it that way for a reason. Whatever.
There is help. A hired gun shared a really cool tip (which is old hat to the enlightened I'm sure). Basically its a data dictionary that's baked right into the app. Imagine taking a UI Window Title. Now take that text and search in a tool with it. Blam.. you get all of the "Logical" names of tables that the form uses to do it work. Its pretty good. Way better than slogging through the SDK... This will certainly make things better.
So, GP. I'm OK -- you're OK. In small doses. Don't push it.
Most of this frustration is with the data model -- since my project revolves around data integration. My biggest gripe here is the relatively opaque naming structure. This gets easier if you get a tool to help you find some blogs (one in particular) that describe the inner meanings of what the PM30600 table has in it... or if you were looking for vendor names -- what table that would possibly be in. (its PM00200 btw).
I've really, really gotten too used to more declaritive data models with names like "Customer" or "Contact" or "User" or "Activity". And when you deal with, say, invoices -- that ALL of the invoices are in ONE table. Not true, friend. Not in GP. There's like three. And where the invoice appears depends on how far its gotten in the work stream (entered, posted and/or partially paid, paid / history). I'm smart enough to suspect there's probably a really good reason for this, or dumb enough to believe that someone smart designed it that way for a reason. Whatever.
There is help. A hired gun shared a really cool tip (which is old hat to the enlightened I'm sure). Basically its a data dictionary that's baked right into the app. Imagine taking a UI Window Title. Now take that text and search in a tool with it. Blam.. you get all of the "Logical" names of tables that the form uses to do it work. Its pretty good. Way better than slogging through the SDK... This will certainly make things better.
So, GP. I'm OK -- you're OK. In small doses. Don't push it.
Labels:
Sarcastic,
SOC,
SOC Coding
Monday, November 2, 2009
VMs for Dev..
The other day, my friend posted this. There's a couple points I want to make....
1). Its a really, really good idea:
I don't think I can understate this. Jim makes great points. Performance, backup, hardware survivability, procurement, imagability, etc, etc. Great points that are well made. Its pretty compelling, and especially for your "factory" dev shop... it makes LOADS of sense. With some of the peer organizations that I've come into contact, I've wondered why they don't go this route. Especially when I hear things like (when F5 takes more than "n" seconds, I'm losing money. But I do have some reasoning for why to do it "the old fashioned way".
2). USB, Firewire, and Bluetooth
I know that you still have access to these connectivity and data transfer technologies through a thin client -- but at least with the method Jim describes, its lost. Now, for the rank and file developer working on webdev or "your garden variety business app" this isn't a big deal... but if what you need is dev for any of these stacks you're pretty much out of luck.
3). Dual Screen is basically unusable
So you got that nice 23" flat panel... that's nice... put your browser or Outlook on it cuz you won't be dual screening your RDP session. Oh sure, you can mstsc.exe /span (or whatever) but that pretty much sucks. There's some tooling for splitscreening a little more effectively with RDP sessions... but there aren't many that are good. If you live on the dual screen (and daddy likey him some dual+ screen...) RDP blows for dual screen.
OK, As a collegue pointed out, this actually works pretty well when targeting either a Windows 7 or Windows 2008 R2 host with either a Windows 7 or Server 2008 R2. Guess I found some incentive to upgrade anyway...
4). Accellerated (or 3D) Graphics
Not a *ton* to say here, but I would suspect that there IS a difference between that "generic" 3D display driver for VM ware and your own native 3D card. Just a thought. Again, it you spend your time coding stuff for Sharepoint or WebServices, or boring business apps -- this probably doesn't apply.
5). Connectivity
Jim makes some pretty solid points here. But if your bad at process boundries like I am (like you see long car trips as an opportunity to shore up your DAL and refactor) the laptop is still your friend.
6). They make a VM product for laptops... its VMware workstation
Yeah, you don't get the "enterprisey" features -- but you get some of goodness of workstation (like USB...) and you can version and provision like big-boy VMWare... you just do more of it yourself.
So, I want to try this a little more first hand and see if I can make it work with the way that I work... I like all of the ideas and since a good portion of the code that I write these days (for work and for pleasure) is along the garden variety businessey type applications (sans heavy 3-D graphics) and don't really rely on USB, or Bluetooth. I just need to get out from underneath some projects that have beaten me up lately... then I'll have some time to play with this idea and give it the fair look it deserves.
1). Its a really, really good idea:
I don't think I can understate this. Jim makes great points. Performance, backup, hardware survivability, procurement, imagability, etc, etc. Great points that are well made. Its pretty compelling, and especially for your "factory" dev shop... it makes LOADS of sense. With some of the peer organizations that I've come into contact, I've wondered why they don't go this route. Especially when I hear things like (when F5 takes more than "n" seconds, I'm losing money. But I do have some reasoning for why to do it "the old fashioned way".
2). USB, Firewire, and Bluetooth
I know that you still have access to these connectivity and data transfer technologies through a thin client -- but at least with the method Jim describes, its lost. Now, for the rank and file developer working on webdev or "your garden variety business app" this isn't a big deal... but if what you need is dev for any of these stacks you're pretty much out of luck.
3). Dual Screen is basically unusable
So you got that nice 23" flat panel... that's nice... put your browser or Outlook on it cuz you won't be dual screening your RDP session. Oh sure, you can mstsc.exe /span (or whatever) but that pretty much sucks. There's some tooling for splitscreening a little more effectively with RDP sessions... but there aren't many that are good. If you live on the dual screen (and daddy likey him some dual+ screen...) RDP blows for dual screen.
OK, As a collegue pointed out, this actually works pretty well when targeting either a Windows 7 or Windows 2008 R2 host with either a Windows 7 or Server 2008 R2. Guess I found some incentive to upgrade anyway...
4). Accellerated (or 3D) Graphics
Not a *ton* to say here, but I would suspect that there IS a difference between that "generic" 3D display driver for VM ware and your own native 3D card. Just a thought. Again, it you spend your time coding stuff for Sharepoint or WebServices, or boring business apps -- this probably doesn't apply.
5). Connectivity
Jim makes some pretty solid points here. But if your bad at process boundries like I am (like you see long car trips as an opportunity to shore up your DAL and refactor) the laptop is still your friend.
6). They make a VM product for laptops... its VMware workstation
Yeah, you don't get the "enterprisey" features -- but you get some of goodness of workstation (like USB...) and you can version and provision like big-boy VMWare... you just do more of it yourself.
So, I want to try this a little more first hand and see if I can make it work with the way that I work... I like all of the ideas and since a good portion of the code that I write these days (for work and for pleasure) is along the garden variety businessey type applications (sans heavy 3-D graphics) and don't really rely on USB, or Bluetooth. I just need to get out from underneath some projects that have beaten me up lately... then I'll have some time to play with this idea and give it the fair look it deserves.
Subscribe to:
Posts (Atom)
