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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Active Discussion

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

  • 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 128 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 97

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans