Wednesday, August 20, 2008

Mashups in CRM (Part 1)

Mashups in CRM are powerful and can be very easy to implement. There is so much data in a typical CRM system that can offer more user value when mashed up with other web sites and web applications. In this post I'll show how to create a simple mashup taking some data in CRM and adding it into a URL to provide your end users with some functionality and time savings. In (Part 2) I will show something a little more advanced using a Google Gadget in an iframe.

If you are storing Shippers and Tracking numbers in CRM you have everything you need to give your users a tracking link. Below is an example that will generate tracking links to UPS, FEDEX and DHL.

  1. Create a text field with a Tracking Number in it new_trackingnumber.
  2. Create a picklist telling you which type of shipping is being used new_shippedby. Add UPS, FEDEX and DHL to the picklist
  3. Create a link field for the user to click on new_trackinglink.
  4. Add JavaScript (below) to the OnLoad event for your Form to builds the links for your new_trackinglink below:
var Shipper = crmForm.all.new_shippedby.value;
var trackingNumber = crmForm.all.new_trackingnumber.value;

switch( Shipper )
   case "1": /*UPS*/ crmForm.all.new_trackinglink.DataValue='' + trackingNumber ;  

   case "2": /*FEDEX*/ crmForm.all.new_trackinglink.value =  '' + trackingNumber + '&cntry_code=us&language=english&clienttype=ivother&' 

   case "3": /*DHL*/ crmForm.all.new_trackinglink.value =  '' + trackingNumber ;
Hint: You really don't want lots of copies of the same code. You can reference an existing OnLoad, OnSave event from the same form as follows: crmForm_onload0(); crmForm_onsave0(); So in this case you would add "crmForm_onload0();" to the OnChange event for both shippedby and trackingnumber so that the trackinglink would regenerate whenever you changed either of those fields. Here is your final result, a populated link specific to the shipper: mashup1

1 comment:

Michael Dodd said...

Excellent post! I'm looking forward to Part 2. I'm trying to expand my limited knowledge in the use of mashups in CRM.