Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Odata action method in...
Finance forum
Answered

Odata action method in D365Fo

Posted on by 5,885
Hi Team,
 
I am new to Odata action method. 
 
Kindly send me some reference, how we can create a Odata action method and how will integrate this with Power automate.
 
I am looking for step by step example.
 
thanks in advance! 
Categories:
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 225,348 Super User on at
    Odata action method in D365Fo
    Yes, you can create several actions. It the same as a single action, you'll just create a few more. That's just a simple fact; I'm not sure what kind of reference you want for it.
  • @rp@n Profile Picture
    @rp@n 5,885 on at
    Odata action method in D365Fo
    Thanks Anthony for quick response,
     
    Sure I will
     
    Only one question 
     
    Can we have multiple methods in custom data entity (Odata) and to call in single power automate? 

    If yes, kindly provide me some reference pls.
     
    Like for example - 
    Creating Product receipt
    Posting Product receipt
     
     
     
    thanks in advance!
  • Anthony Blake Profile Picture
    Anthony Blake 1,014 on at
    Odata action method in D365Fo
    Yes you should be able to run that an OData action from power automate, if your posting code is in there it will run. Give it a go and if you have any issues create a forum post, I'm sure someone will be able to help.
  • @rp@n Profile Picture
    @rp@n 5,885 on at
    Odata action method in D365Fo
    Thank Anthony and Layan
     
    as posted "OData actions are runnable code, so imagine you had some business logic attached to the data entity which you needed to run, or some data you needed to retrieve which was not a simple query it required some X++ code".
     
    for example - point no 1 - I have business logic to Post Product Receipt in the custom data entity (Odata)
     
    point no 2 - In the next part. power automate , what it will do with the" Post Product Receipt"(Point no 1).  
     
    When Power automate get triggered, it will post the product recipt and send the notification to External system.

    basically use of power autoamte is here to send the notification ( once product receipt posted) to the external system only and rest of the things (business logic execuation) happend in d365fo based on the configuration on Power auomate.
     
    am I correct?
     
    Kindly verify plz.
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 4,150 Super User on at
    Odata action method in D365Fo
    Hi,
     
    I like this article about odata actions. It explains it well:
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Suggested answer
    Anthony Blake Profile Picture
    Anthony Blake 1,014 on at
    Odata action method in D365Fo
    OData actions are runnable code, so imagine you had some business logic attached to the data entity which you needed to run, or some data you needed to retrieve which was not a simple query it required some X++ code. 
  • @rp@n Profile Picture
    @rp@n 5,885 on at
    Odata action method in D365Fo
    Hi Anton, thanks for quick response.
     
    Can we use stnd. Entity and Custom entity both for ODATA action method?
     
    What is the purpose of use ODATA action method.
     
    When exactly we think about ODATA action method to use 
     
    Kindly elaborate please 
     
    Thanks in advance!
     
     
  • Suggested answer
    Anton Venter Profile Picture
    Anton Venter 5,592 Super User on at
    Odata action method in D365Fo
    Hi,
     
    In the article below, it shows an example of how to add an action on OData entities. The second link seems to answer your second question about calling the action (method) Power Automate.
     
     
     
     

Helpful resources

Quick Links

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284,781 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,348 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans