Saturday, July 31, 2010

Categories

Minimize

Archive

Minimize

Tag Cloud

Minimize

Altriva Team Blog

Minimize

Custom Extensions – JavaScript using API’s vs. Plug-ins

Posted by: Hoss Hostetler on 1/3/2009
  • Categories:
  • CRM

Once we have defined the processes we want to capture within our CRM system and we have begun our design and captured a user's usage scenarios, we often find places where custom code can help with automating some user processes to make them more efficient or enforce data validation.

There are many different options to automate business processes within Microsoft Dynamics CRM 4.0.  Today we will look at the differences between doing it via JavaScript that calls back into the CRM API’s versus using Plug-ins.

Automating Business Processes: Using JavaScript to Call API's vs. Plug-ins

Data validation and retrieval from other CRM entities or systems are often useful when automating business processes. There are multiple ways you can accomplish these tasks in Microsoft CRM. Two frequently used methods are synchronous plug-ins and form-level JavaScript calling either the CRM API's or integrating with another system.

One benefit to using JavaScript is that since JavaScript is run on the form (client-side), it can react to any OnChange or OnLoad event on the form and provide immediate feedback to users. In other words, users do not have to wait until saving the form for data validation or retrieval to take place. Additionally, client-side JavaScript allows for greater flexibility when communicating messages to the user, as well as with field manipulation. JavaScript's downside is that since it runs client-side, it requires more roundtrips between the server and client. This approach is not an issue if most users have good connections to the server. However, a client-side approach can impact performance in the case of a deployment with users spread across multiple offices or with users having slow server connections. Furthermore, creating an additional client-side connection to the CRM server or other external servers can break functionality when a user is offline or cannot access the external server. Another point to consider is that the use of client-side scripting transfers additional processing load from the server to the client

To contrast, Plug-ins in Microsoft Dynamics CRM 4.0 run server-side and therefore do not offload any processing load to the client. This is usually a non-issue unless your CRM server is underpowered. With server-side processing, the performance impact will be the same for all users no matter where they access CRM from. Another benefit is that the Microsoft CRM Plug-in model has built in ways to handle online and offline processing that are described in the CRM SDK. The downsides of using Plug-ins are that a user must click save to trigger the Plug-in and there are a limited set of responses you can send to the user from within your plug-in.

Both Plug-ins and JavaScript scripting to call API's have their uses. For example, JavaScript is a viable choice and could be the best solution if you are building a solution for a call center where all users have consistently fast connections and immediate data validation response helps their business process. On the other hand, if you have a dispersed workforce with slow or limited connections to CRM server, then the plug-in model might work better for you. One roundtrip on-save that results in an error message might be much quicker than waiting for multiple server roundtrips after each field is filled out.

- Hoss Hostetler

Create a trackback from your own site.

0 Comments

Leave A Comment



Please enter the CAPTCHA phrase above.



  
  

Recent Comments

Minimize

"Hi Lee -- I would just create one-off workflows for each user in your system in that case. Or, create a number of sync users for yourself, and then bulk edit those sync users to another record." Read more
by Phil Edry on Allow Multiple Users to Sync the Same Contact to Outlook Effortlessly with Microsoft CRM

"Norbert and Jeff -- CRM Online couldn't support this exact setup due to current limitations with plug-ins. However, a different integration could be developed that would work with Online and BPOS. If you'd like additional information, please feel free to email info@altriva.com." Read more
by Phil Edry on CRM to SharePoint Site Creation and Clients List Integration

"great article thanks Would the CRM security model be adhered to by the calendar? I have 30 business units in CRM and want a shared calendar at the BU level but for users to only see the records from thier BU and not the whole system. Would be nice not to have to build multiple calendars?" Read more
by Jeff Murtari on Adding a Custom Calendar to the CRM UI

"I also have the same question as Norbert. I'm very interested in this if you're able to do this with CRM Online. " Read more
by Jeff Snyder on CRM to SharePoint Site Creation and Clients List Integration

"Would i be able to do this with the online versions of CRM and BPOS? " Read more
by Norbert on CRM to SharePoint Site Creation and Clients List Integration

"Thanks guys this has solved a major hurdle for us. I may be missing something obvious here but is it possible to modify the workflow, so that "Sync User" can be selected as we have a situtation where the PA would like to set the 'Sync User' for multiple contacts as their manager." Read more
by Lee Southam on Allow Multiple Users to Sync the Same Contact to Outlook Effortlessly with Microsoft CRM

"Good example... event more flexible then CRM Customization Manager" Read more
by Peter Olsson on Export CRM customizations using PowerShell

"Thanks! I encountered this same error, so this was helpful. It would be nice to know what attributes are causing the problem. I heard that some rollups actually changed the size of some attributes. I'm not sure how that would be related to CRM Online or if it could be impacted by the date the organization started using CRM." Read more
by Gretchen Mann on Importing Customizations from one CRM Online Instance to Another CRM Online Instance

  
Copyright 2010 by Altriva LLC