Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Creating/Updating Records in Dynamics F & O using PowerAutomate Flow

(0) ShareShare
ReportReport
Posted on by 5

Hi, 

I have a PowerApps, which is Embedded to Dynamics Finance Operations in SaleOrdersLine Entity, 

First, the user enters data in Parent Grid screen and then it stores in a Parent List and then user creates that Parent- Child Record in Child List 

and I am Saving those Child Records in Dynamics F&O Using Power Automate Flow.


at first the Records are created in SharePoint list and then they are created in Dynamics F&O


Now, after creating child record in PowerApps and pressing the save button it then updates that Parent record (Garment QTY) column in Parent List.

and after that I have created a Flow, which triggers, whenever there is a Updation in Parent List in the column of (Garment QTY).



My Flow is Below:


I am getting that Parent Record > child records from SharePoint and creating in Dynamics Finance Operations in SaleOrdersLine Entity of that SaleOrder.


1) 

Flow-1.png



2)  In the Condition I am checking if the Garment QTY Column is Modified then Get that Parent List Record and Based on that Get its Child Records



0121.screenshot.png


  
3)  AND AFTER GETTING CHILD RECORDS FROM LIST, I AM CREATING RECORDS IN DYNAMICS F&0

pastedimage1668598632574v1.png



Problem:

When, I update a (Quantity) in Child Record using PowerApps, it then updates the (Garment QTY) column in Parent List, 

The Flow runs, and it creates a new line with that updated Quantity << (which is Wrong) .

 *** I want to Update that particular child record in Dynamics, if it's updated in SharePoint list and I only want to create new records if they don't Exist *** 



  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,735 Super User 2024 Season 2 on at
    RE: Creating/Updating Records in Dynamics F & O using PowerAutomate Flow

    Hi Mustafa,

    You can use the action 'List items in a table' with an OData filter as alternative if you don't have the full Object ID.

  • MustafaHussain Profile Picture
    MustafaHussain 5 on at
    RE: Creating/Updating Records in Dynamics F & O using PowerAutomate Flow

    Hi, 

    Andre Arnaud de Calavon

    Actually, there is one Problem in Getting Records (first time) from Dynamics.

    Because (Get a Record) action of Dynamics need an Object ID which is a Unique identifier of a Record.

    before that, when the records were created in Child List, the Parent List column is updated, I start a flow and it then creates records in Dynamics and then I update those Child List, records Column (DynamicsCreatedLotID) after creating records in Dynamics, So, I will know that those records were created.

    but, when a user modifies a record in Child list, the flow runs again it creates those child records again underneath the previous ones.

    So, for that I was asking about a condition to check first before creating for the Very First Time 

    Problem: 

    But I am confused how to check it because in Get a Record action I am passing the (DynamicsCreatedLotID) column of that Child list, at first that column would be empty, and the flow is getting failed. 

    any help regarding?

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,735 Super User 2024 Season 2 on at
    RE: Creating/Updating Records in Dynamics F & O using PowerAutomate Flow

    Hi Mustafa,

    You now used the action 'Create record', which will, like the name suggests, create records. There is a separate action for 'Update record'. You need to evaluate via the flow first if the record exists. If it can find an existing record, then use the action to update the record, otherwise create a new record.

    You can read my blog how to update records: dynamicspedia.com/.../

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans