Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Unable to use the link provided by MS Dynamics to fetch the Entity.

(1) ShareShare
ReportReport
Posted on by 9
Hi All,
 
I am working on an entity /BillOfMaterialsVersionsV3/. I am trying to update and delete the data on it through OData. However, the OData Id (@odata.id) that I am receiving throws an HTTP error 400 (Bad Request - Invalid URL) when I try to hit it on the browser. It is working fine for other entities. How can I get the correct link for the same?
 
 
I have cross checked the values for the key attributes, and they are all correct.
 
Here's the error:
 
 
Thanks in advance.
 
Regards,
Kushank.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,187 Super User 2025 Season 1 on at
    Unable to use the link provided by MS Dynamics to fetch the Entity.
    Hi Kushank,
     
    I thought I replied already, but can't find my latest comment. There is another similar question on this forum where it was working for one item, but not another item. Maybe there is an issue with a maximum length to specify the key fields with their values. I would suggest to check if it works correctly with other entities with less fields in the entity key. Then you can consider contacting Microsoft Support.
  • Unable to use the link provided by MS Dynamics to fetch the Entity.
    Hi Andre,
     
    Apologies for the late reply.
     
    I watched that video. I am doing the same thing on Postman. My delete and update requests are successful for other objects (for example ReleasedProductsV2). If you see the video, Rachit is sending a delete request to a certain URI but for me that URI itself is not working. That makes delete and update impossible to execute.
     
    This URI is the same "@odata.id" that I mentioned in the post.
     
    Here is the sample of "@odata.id" working for ReleasedProductsV2:
     
     
    Update request using the same "@odata.id":
     
     
    After this request, the purchase price is being updated. But back to the same question. This "@odata.id" doesn't work in case of the entity "BillOfMaterialsVersionsV3". I cannot hit the same on browser, I cannot send any delete or update requests either. If you know how I can get the valid URI for the mentioned object, that would be extremely helpful.
     
     
    Thanks,
    Kushank.
  • Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    Unable to use the link provided by MS Dynamics to fetch the Entity.
    If your question is answered, please mark the useful answers as verified so that this can be useful for others in future.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,187 Super User 2025 Season 1 on at
    Unable to use the link provided by MS Dynamics to fetch the Entity.
    Maybe a video form Rachit Garg would help you out. It shows how to update or delete records using LogicApps. What tool are you using?
    When updating or deleting the record, you would need to provide all the fields of the entity key and the DataAreaId. When you are using the Fin and Ops connector in Logic Apps or Power Automate, ensure the default company of the user is the same as the company from which you want to update or delete records.
     
     
  • Unable to use the link provided by MS Dynamics to fetch the Entity.
    Hi Mohit, Andre and Bharani.
     
    Thanks for the responses. I am able to use the filter to fetch the data.
     
     
    But I want to update and delete the data on it using OData. I cannot use that link with filter for the same. I have to use the "EditLink" that is provided by MSD365 but in this case it is not working. Here are the few attributes from the same data object that are not shown by default.
     
    "@odata.type": "#Microsoft.Dynamics.DataEntities.BillOfMaterialsVersionV3",
    "@odata.id": "https://trial-0zyrz7.trial.operations.dynamics.com/data/BillOfMaterialsVersionsV3(dataAreaId='usmf',ManufacturedItemNumber='4401',BOMId='000021',ProductionSiteId='1',ProductConfigurationId='',ProductColorId='Green',ProductSizeId='',ProductStyleId='',ProductVersionId='',IsActive=Microsoft.Dynamics.Ax.Xpp.NoYes'Yes',ValidFromDate=1900-01-01T12:00:00Z,FromQuantity=1)",
    "@odata.etag": "W/\"JzE1MzEyNjU5NSw2ODcxOTQ4Mzc2Myc=\"",
    "@odata.editLink": "./BillOfMaterialsVersionsV3(dataAreaId='usmf',ManufacturedItemNumber='4401',BOMId='000021',ProductionSiteId='1',ProductConfigurationId='',ProductColorId='Green',ProductSizeId='',ProductStyleId='',ProductVersionId='',IsActive=Microsoft.Dynamics.Ax.Xpp.NoYes'Yes',ValidFromDate=1900-01-01T12:00:00Z,FromQuantity=1)",
     
     
    To update/delete the data, I use the @odata.id and/or the @odata.editlink. I want to find out the correct editlink in this case.
     
    Note: The value for "IsActive" attribute is wrong in the id and editlink. I have to manually change it by checking the following attributes:
     
    "IsActive@odata.type": "#Microsoft.Dynamics.DataEntities.NoYes",
    "IsActive": "Yes"
     
    Can you please suggest me a way to get a working @odata.id or @odata.editlink. That would help me a lot.
     
    Thanks in advance.
     
    Regards,
    Kushank.
     
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    Unable to use the link provided by MS Dynamics to fetch the Entity.
    Try this.
     
    <D365URL>/data/BillOfMaterialsVersionsV3?cross-company=true&$filter=dataAreaId eq 'usmf' and ManufacturedItemNumber eq '4401'and BOMId eq '000021'
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,187 Super User 2025 Season 1 on at
    Unable to use the link provided by MS Dynamics to fetch the Entity.
    Hi Kushank,

    Instead of trying to specify the entity key, you can also use the filter syntax. 
     
    https://trial-0zyrz7.trial.operations.dynamics.com/data/BillOfMaterialsVersionsV3?$filter=dataAreaId eq 'usmf' and ManufacturedItemNumber eq '4401' and BOMId eq '000021' and ProductionSiteId eq '1' and ProductConfigurationId eq '' and ProductColorId eq 'Green' and ProductSizeId eq '' and ProductStyleId eq '' and ProductVersionId eq '' and IsActive eq Microsoft.Dynamics.DataEntities.NoYes'Yes' and ValidFromDate eq 1900-01-01T12:00:00Z and FromQuantity eq 1
     
    Note that there is no active version. To get at least one record, you can use the next link.
     
    https://trial-0zyrz7.trial.operations.dynamics.com/data/BillOfMaterialsVersionsV3?$filter=dataAreaId eq 'usmf' and ManufacturedItemNumber eq '4401' and BOMId eq '000021' and ProductionSiteId eq '1' and ProductConfigurationId eq '' and ProductColorId eq 'Green' and ProductSizeId eq '' and ProductStyleId eq '' and ProductVersionId eq '' and IsActive eq Microsoft.Dynamics.DataEntities.NoYes'No' and ValidFromDate eq 1900-01-01T12:00:00Z and FromQuantity eq 1
     
  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    Unable to use the link provided by MS Dynamics to fetch the Entity.
    Hi Kushank, As the error suggested, the issue is in URL. I suggest to try removing few fields like isActive, FromDate to narrow down which field is the root cause. 

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans