Calling the External WCF Service From Java Script In CRM 2013

Summary: Calling the External WCF Service From Java Script In CRM 2013


function WCFServiceCalling(oppid, oppname,fileNames) {
    var Opportunity = new Object();
    Opportunity.OpportunityID = oppID;
    Opportunity.OpportunityName = oppName;
    $.ajax(
        {
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "http://ServerName/ORBDocService.svc/MethodName",
        async: false,
        data: '{"opportunity":' + JSON.stringify(Opportunity) + ',' + '"fileNames":' + JSON.stringify(fileNames) + '}',
        dataType: "json",
        success: function (response) {
        if (response != null && response != 'undefined') {
            flag = response;
            return response;
        }
    },
    error: function (a {
        alert("An error occured");
    }
});
}

2 comments:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Java Training in Chennai | Core Java Training in Chennai

    Online Java Training Online Java Training | JavaEE Training Institute in Chennai

    ReplyDelete

Popular Posts