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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Failure to invoke acti...
Finance forum

Failure to invoke action on OData entity

(0) ShareShare
ReportReport
Posted on by 35

Good day everyone, this is my first post on the form.

I am totally stuck on a problem here. I have been following the instructions on these two sites:
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/build-consuming-data-entities#consuming-entities-by-using-odata
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/odata#setting-navigation-properties-between-odata-entities

I am at the stage of "Adding actions on OData entities". 

[SysODataActionAttribute("CalcMaintenanceDuration", true)]
public int CalculateMaintenanceDuration()
{
//do something
return 0;
}

I followed the example of the code above, I entered my own names, I rebuild the solution and then I ran the command "iisreset" in the command prompt. When I run https://usnconeboxax1aos.cloud.onebox.dynamics.com/data/$metadata in postman, I can see the action I created inside the metadata. My problem now is when I try to invoke it I am consistently greeted with a 404 "No route data was found for this request."

I have found a few other sites with vague descriptions of how the endpoint should be arranged but with no success.

Any light on this matter would be greatly appreciated.

Kind Regards,
Corné Smith


 

I have the same question (0)

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans