CRM Integration Made Easy With Web Service

Integration made easy with web service

(Single Plug & Play Solution to call Different web service (without adding Reference) like SOUP-UI)

CRM integration is a major challenge for organizations of all sizes. All businesses today are focusing more on customer and front office to be able to provide higher value-added services and support to them. The reason for doing so is obvious, as it helps them maximize their ROI, lead to greater customer satisfaction, ensures higher revenue leading to healthy bottom line.

Due to browsers’ cross domain restriction, you cannot have JavaScript functions executing on a CRM form event or when a ribbon button is clicked calling web services outside of the CRM domain. The issue is related to a security perspective.

In this article, we are providing an example of how Single Action can be used to make a request to different web services outside of the CRM domain from a record’s form event. For this you would need to provide only the web service URL and required inputs.

Scenario
In some CRM deployments we need to call multiple web services according to the requirement for different events and there is a possibility that the web service is hosted on an environment other than the CRM Domain. So there is need of Single Plug & Play Solution to call different web services.

Process Configuration
To overcome the problems in integration of web services, we can write a Single Action that would be enough to integrate multiple web services with required number of input & outputs.
Here is the process to implement this solution. The steps are really simple to understand and implement.

1. Create an Action of type process. This action would have say 4 input values and 1 output value.
2. The action would need a custom workflow activity which will work as bridge between CRM application and the external web service which could be either in same domain or different domain. This custom workflow will be responsible for fetching the required details by calling the expected web service.

Please refer to the attached dll of the custom workflow which you could use directly in any action to call web service by passing the input parameter only. Please note that you do not need to add any type of web reference of any web service.

Calling Action from JavaScript

This is the last piece of the puzzle. At this point, we simply need to call the action created
from a web resource library on any event ( e.g. Ribbon button click, OnChange of a field value etc.).

To call action from web resource library you need to write a function that is triggered when the expected event occurs at client side.

This function will trigger an action in effect and consume the values returned by action, read the output values and use the same as required.

Alternate Solution

To call web service in other domain, another solution is needed to deploy intermediate web service in same domain and call this service from CRM web resource library. This approach has its own side effects. E.g. Fluctuating results, Performance issues, maintenance in future in case of additional web methods to be added etc.

Conclusion

With the solution of using actions to call web services in this blog we get benefited in terms of:
1. Plug and Play Solution
2. Improved Performance
3. No Fluctuation in Results
4. Very Less Maintenance
5. One Time Efforts

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *