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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

How To Update Released Products via API \ Postman?

(0) ShareShare
ReportReport
Posted on by 131
Hi all,
 
I can successfully create Released Products in D365 F & O via a POST request to the Data Entity: /data/ReleasedProductsV2
 
However, how do I update Released Products?  At the moment I am testing in POSTMAN.
 
Using PATCH I have tried:
 
/data/ReleasedProductsV2(ItemNumber='001234')
 
And in the body:
{
            /SearchName/: /Some text goes here/
}
 
But I receive a 404 // Not Found.
 
I have also tried variations:
 
PATCH: /data/ReleasedProductsV2(ProductNumber='001234')
 
PATCH: /data/ReleasedProductsV2(ProductNumber='001234',dataAreaId = 'A123')
 
But I still receive the 404.
 
If I change Product Number to Item Number I receive a 400 // Internal Server Error:
 
/data/ReleasedProductsV2(ItemNumber='001234',dataAreaId = 'A123')
 
What am I missing?
 
 
I have the same question (0)
  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at
    Using ProductNumber is definitely wrong, because the entity key is ItemNumber, not ProductNumber.
     
    I would expect ReleasedProductsV2(ItemNumber='001234',dataAreaId='A123') to work. Maybe the URL is correct and it fails for some other reason.
     
    By the way 400 is not not Internal Server Error (that's 500). 400 is Bad Request. Which one of them are you getting?
  • Michael Hutcheson Profile Picture
    131 on at
    Hello,
     
    In Postman if I submit a PATCH: /data/ReleasedProductsV2(ItemNumber='001234',dataAreaId = 'A1234')
     
    It defo say 400 \ Internal Server Error:
     
  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at
    The error is weird; the description does not match the status code. My guess it's really an internal server error, therefore we're resolved the problem with URL and the request reaches F&O. It fails there, but that's a different problem. Event logs might reveal more details.

    By the way, will it make any difference if you try my URL instead of yours? Mine doesn't contain spaces.
     

  • Michael Hutcheson Profile Picture
    131 on at
    Removing the spaces did not resolve it but thanks for the suggestion.
     
    FYI - The exact error in the logs are:
     
    {
        "error": {
            "code": "",
            "message": "An error has occurred.",
            "innererror": {
                "message": "No resources were found when selecting for update.",
                "type": "Microsoft.Dynamics.Platform.Integration.Services.OData.ODataArgumentException",
                "stacktrace": "   at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateManager.GetEntityForUpdate(IQueryable query, EntityType entityType)\r\n  
    at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataController.GetChangeInfoWithConcurrencyCheck(RequestEntityInfo requestEntityInfo)\r\n  
    at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataController.Patch()\r\n  
    at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClassc.<GetExecutor>b__6(Object instance, Object[] methodParameters)\r\n  
    at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   a
    t System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   a
    t System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n---
    End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n---
    End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Tracing.Tracers.HttpControllerTracer.<ExecuteAsyncCore>d__5.MoveNext()\r\n---
    End of stack trace from previous location where exception was thrown ---\r\n  
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()\r\n---
    End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
    at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
            }
        }
    }
     
     
     
    This line 'IDictionary`2 arguments' stands out?
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at
    .Hi Community Member,
     
    'No resources were found' means that it couldn't find a record to be updated. Are you sure the product is available in the company? 
    If so, then check your default company in Dynamics 365 F&O? Is this also 'A123'? If not, try to set it to this company or enable the cross company option with the keyword 'cross-company=true'.
  • Verified answer
    Layan Jwei Profile Picture
    8,097 Super User 2025 Season 2 on at
    Hi Community member,

    This a weird behaviour I noticed with this entity only as well. To solve this you need to make sure that the user assigned to the clientId has the same dataAreaId that you use in postman.

    So for example, if you want to use DataAreaId = D1

    URL/data/ReleasedProductsV2(ItemNumber='abc',dataAreaId = 'd1')?cross-company=true
     
    Then you need to go to the user assigned to the clientId you use that is defined in Azure active directory and make sure the dataAreaId assigned to this user is also D1 and Save


     
     

    You need to change this  each time you change the dataAreaId in postman -- give it a try and let me know if it works.

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future. You can do this by ticking the box "Does this answer your question"
  • Michael Hutcheson Profile Picture
    131 on at
    Hello Layan,
     
    I have followed your suggestion and it has worked - many thanks.
     
    Regards,
     
    Michael

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 283 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 152 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans