Using the F&O connector to update a record
We can’t update the records straight away. Remember that the JSON
file is an array, so we need to loop through the items in the array to process each one. Add an Apply to each control block (see Figure 5.9):
Figure 5.9 – The Apply to each control block
In this control block, we must select the Body element of the parse JSON action. The body contains the JSON array we need to loop through. All the actions we add inside this block will be repeated for each item of the array.
Next, we will process each record – first selecting it and then updating the record if we need to.
Getting the existing record
Remember that to update a record in Power Automate using the F&O connector, we have to select it. This is similar to what we do in X++ – we need to do a select forupdate
first, and then update it.
To do that, we will use the Get a record action of the Fin & Ops Apps...