currently i'm working on crm project. in project have send data web service , take refined data back. operation must work on custom workflow i'm stuck infact have no idea how it? suggestions?
here service code; var tmpincident = getincidentbyid(organizationservicecontext); if (tmpincident != null) //if have decent incident connect service , proceed data. { getcustomerinfoservice.transactionserviceclient client = new getcustomerinfoservice.transactionserviceclient(); getcustomerinfoservice.transactionrequest request = new getcustomerinfoservice.transactionrequest(); #region authentication request.authenticationdata.username = "user"; request.authenticationdata.password = "pass"; #endregion guid id = guid.newguid(); //create random guid request.requestid = id.tostring(); request.ordernumber = tmpincident.vrp_ordernumber; getcustomerinfoservice.transactionresponse response = client.gettransactionbyordernumber(request); tmpincident.customerid = new entityreference("contact", new guid(response.message)); this.updatechanges(organizationservicecontext, tmpincident); client.close(); }
when tested plugin, received error;
error message:
unhandled exception: system.invalidoperationexception: not find default endpoint element references contract 'getcustomerinfoservice.itransactionservice' in servicemodel client configuration section. might because no configuration file found application, or because no endpoint element matching contract found in client element. @ system.servicemodel.description.configloader.loadchannelbehaviors(serviceendpoint serviceendpoint, string configurationname) @ system.servicemodel.channelfactory.initializeendpoint(string configurationname, endpointaddress address) @ system.servicemodel.channelfactory1..ctor(string endpointconfigurationname, endpointaddress remoteaddress) @ system.servicemodel.configurationendpointtrait
1.createsimplexfactory() @ system.servicemodel.clientbase1.createchannelfactoryref(endpointtrait
1 endpointtrait) @ system.servicemodel.clientbase`1.initializechannelfactoryref() @ vrp.crm.pluginlibrary2013.getcustomerinfoservice.transactionserviceclient..ctor() in :line 0 @ vrp.crm.pluginlibrary2013.customworkflows.setcumstomeridtoincident.execute(codeactivitycontext context) in c:\veripark\projects\gisik\drcrm.veritouch.crm2013\pluginlibrary2013\customworkflows\checksubincidentformainincident.cs:line 72 @ system.activities.codeactivity.internalexecute(activityinstance instance, activityexecutor executor, bookmarkmanager bookmarkmanager) @ system.activities.runtime.activityexecutor.executeactivityworkitem.executebody(activityexecutor executor, bookmarkmanager bookmarkmanager, location resultlocation)
assuming using dynamics crm. high-level overview:
- create custom workflow activity makes actual call webservice. should started: https://msdn.microsoft.com/en-us/library/gg328515.aspx
- the custom activity have output parameters return results webservice calling crm workflow.
- finally create workflow , triggers make use of custom activity. more info: http://crmbook.powerobjects.com/system-administration/processes/workflows/ https://msdn.microsoft.com/en-us/library/gg328264.aspx
i hope enough information heading down right path.
Comments
Post a Comment