Skip to main content

Notifications

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);
}
  • Verified answer
    huijij Profile Picture
    19,811 on at
    RE: Calling FO - OData action using Postman

    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

  • Verified answer
    AnithaEswaran Profile Picture
    2,032 on at
    RE: Calling FO - OData action using Postman

    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

       }

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,099 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans