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 :
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

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

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans