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

  • Community Member Profile Picture
    on at
    RE: Calling Global custom action using JavaScript in CRM 2013

    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

  • sdfasdf Profile Picture
    840 on at
    RE: Calling Global custom action using JavaScript in CRM 2013

    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,

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans