Skip to main content
Question

Releasing credit memo

  • July 13, 2026
  • 2 replies
  • 15 views

Hello,

Our Acumatica on version 25.200.001. After creating credit memo invoice and Releasing the invoice

by calling Invoice/ReleaseInvoice then I try to get the status of releasing invoice 

Invoice/ReleaseInvoice/status. First time call to get the status it fails and get 500 internal service error

seconde time Succeeded and I can status no content 204.

Why it is failing always first time. I tried to but delay after release but same thing.

2 replies

mohammadnawaz51
Varsity I
Forum|alt.badge.img+7

@swassouf can you add more details on this, Are you trying to call the status using API?


  • Author
  • Freshman I
  • July 13, 2026

Yes I am trying to call the status using API correct to get the status of the invoice release. 
I get status internalservererror
 


for (int retry = 0; retry < 10; retry++)
{
var status = await GetProcessStatusAsync(location, branch, ct);

switch (status)
{
case HttpStatusCode.NoContent:
return;
case HttpStatusCode.Accepted:
await Task.Delay(intervalMs, ct);
continue;
default:
throw new InvalidOperationException($"Unexpected action status {status} for location {location}.");
}
}
private async Task<HttpStatusCode> GetProcessStatusAsync(string location, string branch, CancellationToken ct)
{
var parsed = ParseActionLocation(location);
if (parsed.ActionName == null) return HttpStatusCode.NoContent;

var statusUri = BuildUri($"{parsed.EntityName}/{parsed.ActionName}/{parsed.Status}/{parsed.ID}");
using var req = await BuildRequestAsync(HttpMethod.Get, statusUri, branch, ct);
using var response = await SendAsync(req, ct);
var body = await response.Content.ReadAsStringAsync(ct);

if (!response.IsSuccessStatusCode)
{
AcumaticaHttpDiagnostics.LogFailure(logger, "GET", statusUri, branch, (int)response.StatusCode, response.ReasonPhrase, body);
}

return response.StatusCode;
}