Hi
I have a post create plugin for Task entity that should call webservice(hosted on-premise with dns name eg. mycrm.mycompany.org:9000/GenerateLetter.asmx
The webservice has web method (GetSecurityGroupID) that takes input parameter from plugin and executes a stored procedure and returns back the result as integer value. It is working fine when tested from a console app. But when I execute from plugin by creating a task entity data, it doesn't work and couldn't get the error message also.
In plugin, I have added a service reference of the web service and tried to call in a normal way but couldn't get the output. Following is the code in the plugin
OneToOneWebService.GenerateOneToOneLetterSoapClient wb = new OneToOneWebService.GenerateOneToOneLetterSoapClient();
int securityGroupId = wb.GetSecurityGroupID(task.compass_workflowattribute1);
Any help would be greatly appreciated.
Thank you
Gandhi
Thank you so much Prateek for the knowledge.
Since the web services execute sql commands on on-prem sql server database, I don't think I can move to Azure web service.
I will work my Web administrator team member to find out if we can expose the webservice to the internet.
I'll keep posted.
Hi,
If it is CRM online then your webservice should be accessible from internet. The plugin will run on CRM data center and it will not have access to your webservice so don't think you can proceed this way.
I believe you should move your web service to azure web service and then it will be easer to consume.
Thanks,
Prateek
The CRM is online and the isolation mode is Sandbox. The plugins are running in the context of calling user.
The webservice is hosted on-premise and it executes sql command against the database which resides on-premise.
Are you using CRM online or on-prem? If on-prem then what is the isolation mode for plugin?
Thank you so much for the reply Prateek.
I did the custom binding like you suggested and that part seems to be working.
The issue I am getting now is below:
Exception Message: An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): System.Exception: Unable to connect to the remote server
My web service is hosted on-prem : mycrm.mycompany.org:9000/GenerateLetter.asmx. DNS and everything setup with claim based and ADFS enabled.
Do the web service really need to be hosted in internet to be able to consumed by plugin?
Thanks in advance.
Gandhi
In plugin, the config is not there so binding information goes missing.
You need to do custom binding - something like this :
msdynamicscrmblog.wordpress.com/.../
Thanks,
Prateek
Muhammad Shahzad Sh...
51
Most Valuable Professional
Ramesh Kumar
42
David Shaw_UK
27