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)

CRM Web API - Changes to Custom Action metadata doesn't refresh through WebAPI

(0) ShareShare
ReportReport
Posted on by 90

Hi all,

I am not sure if I am the only one having this problem because I don't find much help in Google. The background is that I have created a custom action with 2 input arguments of type EntityReference and a custom activity. As per our business scenario, only one of this entity reference will have a value, and other will be null. But as explained in this post, we have to pass a non-null value to both parameters unless we want to get a null reference exception (which was true in my case, even though the exception was not from my custom activity). Hence I had to change the input argument type to String and pass empty string ("") instead of null value.

The problem is, when I call this custom action through Web API, the values are not passed to my custom activity. But the same values are passed correctly using SOAP end point. Actually this is not the first time, it has happened and I have faced this issue before. I simply created a new action with a different name and it works fine. But I want to get to the root of it.

Has anyone faced this issue? What do I have to do in case I want to keep using Web API for calling this action and don't want to create a new action? A comparison of both calls.

8132.Code.png

*This post is locked for comments

I have the same question (0)
  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Check the metadata of your activity using Url - yourorgname.crm.dynamics.com/.../$metadata

  • Dynamics_Alok Profile Picture
    1,746 on at

    What is the response of REST Builder .Please try to create Action call  request using REST Builder and execute it .May be you would get some insight.Changing Parameter type is the cause and it may be stored in Server Cache.

  • Verified answer
    Johninfant Profile Picture
    90 on at

    Hi Andrew/Alok Srivastav,

    Thanks for the replies.

    I missed to take the screenshot of metadata yesterday, but today it seems fine. The arguments are changed to string type and the values are getting passed. May be it takes a while to refresh the Wep API metadata. Not sure how long it is, but some time back, I have tried to fix this issue for nearly 2 hours and it persisted. May its refreshed by EOD?

    Plugin trace log from today. 

    New-Code.PNG

  • Ahmad Pirani Profile Picture
    90 on at

    For me it is over a week now and my custom action metadata has not refreshed. I added couple of parameters, one input and one output.

    Strangely, when I first created this custom action, it won't show up in the metadata, unless I add a output parameter. After adding a output parameter, the custom action showed up but it never showed the output parameter in the metadata. Just the those parameters that I had added during the creation process.

    I wonder if metadata can be forced refreshed or did Microsoft intentionally did this "by design", their standard answer to things they screwed up on.

  • Suggested answer
    Mattias007 Profile Picture
    15 on at

    Hi all,

    I also had this issue that my action didn't show up in the metadata. In my case the action has 2 output parameters. I tried with publish all customizations and iisreset but it still didn't show up in the metadata. What finally resolved the issue was when I removed one of the output parameters. Then it showed up in the metadata, and I could call it with Web API. For reference we use the 8.2 endpoint on on-premise.

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