Declaring Literal Objects in C#

Here’s an awesome blog post on how to declare literal objects and object arrays in C#. My example involved calling a method within my C# custom workflow activity class: protected override void Execute(CodeActivityContext executionContext) { . . . dynamic[] sendFields = { new { type = "TO", teamMembers = GetTeamMembers(service, …

How to Change the Default PriceList or Currency in CRM 2011

Add the following code within a web resource: function setPriceList() { //Create an array to set as the DataValue for the lookup control. var lookupData = new Array(); //Create an Object add to the array. var lookupItem= new Object(); //Set the id, typename, and name properties to the object. lookupItem.id …

CSS3 Bullets

If you want bullets other than the regular ones provided by HTML, you could implement bullets based off of images. However, let’s say you decide to change your website’s color scheme. In this case, you would need to re-edit the image. I like using CSS because there’s a lot you …

Re-trigger a Backbone.js Route

Routes are an easy way to link URLs to execute specific Javascript code. This could be useful, for example, for defining specific tasks for your app: http://some.site.com/my-sales-order-app/#show-so-details/SO-12345 In the above example, you could have the route show-so-details map to a specific javascript function in your code that would show more …

XLink Property in SVG textPath Nodes

Ran into a problem today with attempting to manipulate textPath SVG elements within the DOM. Consider the following, where the variable svg is an SVG element in your DOM: var g = document.createElementNS(“http://www.w3.org/2000/svg”, “g”); var label_container = document.createElementNS(“http://www.w3.org/2000/svg”, “text”); var label = document.createElementNS(“http://www.w3.org/2000/svg”, “textPath”); label.setAttributeNS(“http://www.w3.org/1999/xlink”, ‘xlink:href’, ‘#some-path’); label.appendChild(document.createTextNode(“Hello, World!”)); label_container.appendChild(label); …