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 :
Microsoft Dynamics CRM (Archived)

Not getting Output parameter of Action

(0) ShareShare
ReportReport
Posted on by 27

Hi,

I have created custom button and on click of that JavaScript custom action is executed which has one "Entity Reference" as output parameter.

which calls the plugin and I have set the value of output parameter in Plugin.(Value is set in Output parameter i checked this while debugging the code.)

But I am not getting output parameter values in JavaScript code.

Below is my JavaScript code:

 var target = {};
        target.entityType = "cf_budgettracker";
        target.id = Id;

        var request = {};
        request.entity = target; 
        request.getMetadata = function () {
            return {
                boundParameter: "entity",
                parameterTypes: {
                    "entity": {
                        typeName: "mscrm.cf_budgettracker",
                        structuralProperty: 5
                    }
                },
                operationType: 0, // This is an action. 
                operationName: "cf_CloneBudgetAction"
            };
        };

        Xrm.WebApi.online.execute(request).then(
            function (result) {
                if (result.ok) {
                  //output values are not coming
                 
               
                }
            },
            function (error) {
                console.log(error.message);
                // handle error conditions
            }
        );
    }
};


5810.action.png

Plugin Registration Details:

0167.plugin.png

Action:

3247.Screenshot_5F00_2.png

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    scott.golightly Profile Picture
    5 on at

    It has been almost a year since you asked this question but I had the same question and thought I would add an answer in case others came to this post.

    According to carldesouza.com/.../ there are different code paths when using different methods so you should use XMLHttpRequest instead of Xrm.WebApi.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans