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 :
Finance | Project Operations, Human Resources, ...
Answered

Entity method not supporting Http Get

(0) ShareShare
ReportReport
Posted on by 3,262

Hi

Implemented Entity Method

[SysODataActionAttribute("preImport", false),
        SysODataCollectionAttribute("return", Types::Integer)]
public static boolean preImport()

Entity Call: ../data/EntityCollectionName/Microsoft.Dynamics.DataEntities.preImport

Error: The requested resource does not support http method 'GET'.

What setup is missing?

Thanks for help.

I have the same question (0)
  • Suggested answer
    nunomaia Profile Picture
    25 Moderator on at

    Sent the same request with POST method 

  • Jan M. Profile Picture
    3,262 on at

    Get is what minimally should work, as it is invoked from a pipeline web-request call.

    According to this post we implemented the Methods, but we cannot see any additional setup. nuxulu.com/.../

    Others who can share there ideas?

  • Verified answer
    nunomaia Profile Picture
    25 Moderator on at

    You are exposing an action, so it's a HTTP POST method.

    On blog than you sent, you can confirm that it's using a POST in Postman  

  • Jan M. Profile Picture
    3,262 on at

    Correct, we are using

    $body = "{ 'environment' : '$EnvironmentName'  }"
    $response = Invoke-RestMethod -Uri $url -body $body -Headers @{ "Authorization" = "Bearer "   $accessToken } -Method POST -ContentType "application/json"

    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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans