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

Calling FO - OData action using Postman

(0) ShareShare
ReportReport
Posted on by 85

Hi Team

I wrote an Odata action method in the custom data entity, however when calling this method via Postman it throws the below error: Any help would be appreciated

OData action code below:
[SysODataAction('getInfo', false)]]
public static str getInfo(CustTable _custTable)
{
    return strFmt("%1/%2", _custTable.AccountNum, _custTable.CreditLimit);
}
I have the same question (0)
  • Verified answer
    AnithaEswaran Profile Picture
    2,032 on at

    Hi,

    You can call the metadata to check if the odataaction is created properly.

    Use GET request in postman and call this URL

    url.cloudax.dynamics.com/.../$metadata

    This takes sometime to return the result. In this result, search if your odata action method exists. If it doesnt exist, then you need to correct your code.

    If I were you , I would decorate my odata action like the below :

    /// <summary>

       /// OData Action to check info

       /// </summary>

       [SysODataActionAttribute("getInfo", false),

        SysODataCollectionAttribute("accountNum", Types::String),    

        SysODataCollectionAttribute("return", Types::String)]

       public static void getInfo(CustAccount accountNum)

      {

          //Do a select with account num rather than passing the cust table object

       }

  • Verified answer
    huijij Profile Picture
    19,811 on at

    Hi Rahul,

    Agree with Anitha, your request URI must follow the format

    1.[Your organization's root URL]/data/[Your data entity]/Microsoft.Dynamics.DataEntities.getInfo

    2.The method is decorated with [SysODataActionAttribute]

    Here is a example for OData action using Postman:

    http://vishwad365fo.blogspot.com/2018/05/testing-odata-actions-in-d365.html

    https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/third-party-service-test

    regards

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 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans