web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

API call in repeat loop : The request message was already sent. Cannot send the same request message multiple times.

(0) ShareShare
ReportReport
Posted on by 60

Hello,

I'm trying to call rest API with AL inside a repeat loop, I get this error.

Is there a workaround to avoid it? 

Thanks in advance,

  • Suggested answer
    JAngle Profile Picture
    161 on at

    Maybe a batch call is another option. Build up the json in the loop and then post a batch. Here is info on the batch method: www.kauffmann.nl/.../

    The above blog is split into 3 parts so you get the full detail

  • Junior_Consultant992 Profile Picture
    60 on at

    Hi Josh,

    The json to consume does not support json array to send a batch of data :(

  • Fayssal M. Profile Picture
    10 on at

    Hi, did you manage it? We have the same issue, the api take as a parameter only an id and we need to loop through all the ids then call the api with each id. Cannot call the api with a json and post a batch, if you have by any chance a solution?

  • Suggested answer
    Fayssal M. Profile Picture
    10 on at

    We actually found the solution.

    We just need to clear all the variables (uri, http request, content, headers...) in the beginning of the loop, now it works perfectly ;)

    Hope that it will help someone ;)

  • andreas@protektit.no Profile Picture
    40 on at

    Hello Fayssal M. Could you show by example how you achieved this? I'm currently stuck at the same issue.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 645 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 432 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 248 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans