question

JunTingHo-0477 avatar image
0 Votes"
JunTingHo-0477 asked MayankBargali-MSFT commented

Cannot reference SQL Table output of a Stored Procedure in D365 F&O using Logic Apps

Hi, my team is trying to make reference to SQL table output in a foreach loop to update records in Dynamics 365 Finance & Operations, as shown in the images. We have several stored procedures and most of them can reference table as output in the next step of the Logic App. However, for this specific stored procedure (GetData_[redacted]_SOL), we are unable to do so despite there being a TableSet output. Are there any reasons for this occurring that we should take note of, and how can we possibly fix it or implement a workaround?
81761-20210326-cantrefoutput-001.png81752-20210326-cantrefoutput-002.png


azure-logic-apps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT commented

@JunTingHo-0477 Apology for the delay. Can you share any error/exception while executing the action inside the for loop? It will also help if you can provide the sample input and output of your action inside the loop. I am not sure of on your business workflow but it looks like you are getting the data from SQL and creating record in Dynamics 365. Please confirm if my understanding is correct or share more details on your workflow.
In that case, you need to use the Current item of the for loop and create a record one at a time using creating record action.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MayankBargali-MSFT ,

Thanks for your reply. The understanding is correct and we had solved the problem utilizing your solution - creating a for each loop and creating records one at a time with the "Create Record" D365FO Connector - but we Parsed SQL output to JSON to access the table. No errors or exceptions were encountered utilizing the solution described above.

0 Votes 0 ·

@JunTingHo-0477 Thanks for your response and glad to know that you were able to find the solution. I have converted my comment to an answer for others. Feel free to get back to us in Microsoft Q&A if you need any assistance in the future.

0 Votes 0 ·