Skip to main content

Notifications

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

Import data through odata in a specific company

Posted on by 390
Hi,
 
I am using postman to import data into D365FO but the data is created into the default user company.
I see we can filter based on company while performing GET request but not while POST:https://<D365URL>/data/<DataEntity>.
I am trying to give dataareaid as different company in the body but it doesn't work as well.
 
Thanks!
  • Layan Jwei Profile Picture
    Layan Jwei 7,204 Super User 2024 Season 2 on at
    Import data through odata in a specific company
    Hi Dev,
     
    Can you try with a different environment that is not a Demo? To see if it's a limitation in demo environments.
     
    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
  • Dev Profile Picture
    Dev 390 on at
    Import data through odata in a specific company
    Hi Layan,
     
    You are right. I tried to post to usmf with empty default company then it posted to DAT.
    Also, I tried to change the crosscompany position as u said but still got the wrong result.
    Now I am wondering what could be the issue as it is a demo env and I do not have dev access to debug.
     
    Thanks!
  • Layan Jwei Profile Picture
    Layan Jwei 7,204 Super User 2024 Season 2 on at
    Import data through odata in a specific company
    Hi Dev,
     
    This shouldn't be the issue. True, Odata returns the data by the user default company,
    However, if you want a different dataArea then you use the cross-company.
    The only difference i can see that you put cross-company after filter while i did it before (not sure if this is the cause)
    And it worked with me even though my user has a default company.
     
    And what if it worked with you because it considered Empty default company as DAT. Try to actually release to usmf now (without default company for the user) and see if it returns dat or usmf.
     
    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
  • Dev Profile Picture
    Dev 390 on at
    Import data through odata in a specific company
    Hi Layan,
     
    The issue was as the default company was set for the user when I removed that it worked !
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 7,204 Super User 2024 Season 2 on at
    Import data through odata in a specific company
    Hi Dev,

    I just tried it and it works perfectly. (Make sure you are using the correct url)

    1. I went to product masters and created an item manually of type Product called Test2.
    2. I went to postman, and called the link (url/data/ReleasedProductsV2?cross-company=true&$filter=dataAreaId eq 'dat') as you can see below -- and it returned DAT

    If you are still facing the same issue, maybe try to debug and see why it's not behaving properly of if there is any customization

    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
  • Dev Profile Picture
    Dev 390 on at
    Import data through odata in a specific company
    HI Layan,
     
  • Layan Jwei Profile Picture
    Layan Jwei 7,204 Super User 2024 Season 2 on at
    Import data through odata in a specific company
    Hi Dev,

    Can you share the "body" here

    Thanks,
    Layan Jweihan
  • Dev Profile Picture
    Dev 390 on at
    Import data through odata in a specific company
    Hi Layan,
     
    This is what is happening for me I set the dataareaid as DAT but the data is still populated in USMF.
     
     
    Thanks!
  • Import data through odata in a specific company
    Educational initiatives like the 12th SLiThEr are invaluable in advancing interactive and engaging teaching practices. These sessions provide a forum for educators to share insights, innovative teaching methods, and resources to enhance the learning experience of students.Professional Development: The SLiThEr series offers a space for professional development, allowing educators to learn from one another. It's an opportunity to explore new teaching techniques and technologies https://writemyessay4you.com/case-study that can make the learning process more dynamic and effective.Interactive Learning: Interactive teaching methods have been shown to improve student engagement and comprehension. SLiThEr sessions encourage the incorporation of such methods, which can range from technology-assisted learning to hands-on activities.
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 7,204 Super User 2024 Season 2 on at
    Import data through odata in a specific company
    Hi Dev,

    It also works for posting. can you please show us what you did? what's the url you used and what did you fill the body with? and if you are getting an error show it to us.

    I did an example for creating contacts and it works fine (i specified dataArea in the url and not the body)
     

     
    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

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans