web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Calling Global custom action using JavaScript in CRM 2013

(1) ShareShare
ReportReport
Posted on by

Hi All,

Recently I ran into a blocker while trying to call my custom global action using Javascript in CRM 2013 version.

I got one post by Deepak but that didn't work.

Finally I came through a solution in GitHub named as process.js. It contains Soap calls to Custom Action and workflow which worked perfectly for my scenario.

Below is the link:

https://archive.codeplex.com/?p=processjs 

The above link of Codeplex moved to below link. Refer the below one.

https://github.com/PaulNieuwelaar/processjs

Download Process.js and use as a webresource.

How to call the method. Refer to sample velow:

function onLoad_CallActionFromProcess_JS(actionName, inputParamKey1, inputParamValue1,
inputParamKey2, inputParamValue2) {
debugger;
Process.callAction(actionName,
[{
//key: "Target",
//type: Process.Type.EntityReference,
//value: new Process.EntityReference("account", Xrm.Page.data.entity.getId())

key: inputParamKey1,//"RecordId",
type: Process.Type.String,
value: inputParamValue1//"2B5D9CB2-3805-E911-8114-000D3A707D26"
},
//{
// key: "ColumnSet",
// type: Process.Type.String,
// value: "name, statuscode"
//},
{
key: inputParamKey2,//"ReportType",
type: Process.Type.String,
value: inputParamValue2//"Over26"
}],
function (params) {
// Success
debugger;
var responseText = params.Results;
alert(responseText);
//alert("Name = " + params["Entity"].get("name") + "\n" +
// "Status = " + params["Entity"].formattedValues["statuscode"]);
},
function (e, t) {
// Error
debugger;
alert(e);

// Write the trace log to the dev console
if (window.console && console.error) {
console.error(e + "\n" + t);
}
});
}

Happy Coding!

Saqib

I have the same question (0)
  • sdfasdf Profile Picture
    842 on at

    Hi Sagib,

    If you ever upgrade to Dynamics 365 CE Online, WebAPI might be the best approach to consider for calling custom Actions: docs.microsoft.com/.../use-web-api-actions

    Thanks,

  • Community Member Profile Picture
    on at

    Hi Nathan,

    I am aware of that, but the reason to use the above approach was to implement it in CRM 2013.

    WebApi is a saver which can't be used in older versions.

    Thanks,

    Saqib

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans