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 :
Microsoft Dynamics NAV (Archived)

Dataport Import

(0) ShareShare
ReportReport
Posted on by 65

I created a dataport in Navision to import Engineering BOM lines from a text file. I wasn't able to successfully import the lines into Navision, and i wasn't getting any error messages at all. i pretty new to designing dataport. I would gladly appreciate your help.

Thanks

*This post is locked for comments

I have the same question (0)
  • ManishS Profile Picture
    86 on at

    Can you post a snapshot of the dataport what you have designed.

  • MowaH Profile Picture
    65 on at

    EBOM-Dataport.png

    Here is a copy of the dataport

  • Verified answer
    ManishS Profile Picture
    86 on at

    Try putting Engineering BOM lines.INSERT at the end.

  • MowaH Profile Picture
    65 on at

    EBOM-Dataport-2.png

    I did, but it still wouldn't import the data, and i get no errors at all :(

  • MowaH Profile Picture
    65 on at

    EBOM-Review-2.pngEBOM-Review-2.png

    I was able review the codes and was able to import the data, but my issue now it to match Quantity to Quantity Per.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    In your dataport fields you only have No. and Quantity, how are you getting the BOM Number, if you include all the fields in the file & in the dataport fields then you don't need to add any code, the dataport will import it.  Include your BOM Number, Line Number and for Description you can add the code to retrieve it. Check the standard dataport like 5901.

  • MowaH Profile Picture
    65 on at

    I took your advice, and added those columns but i am really not sure how to write the code to pull in the item description into the Engineering BOM line. I would appreciate your help.

  • Verified answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    In OnAfterImportRecord Trigger just add this code

    IF Item.GET("No.") THEN

      "Description" := Item.Description;

    IF NOT INSERT THEN

     MODIFY;

  • MowaH Profile Picture
    65 on at

    Final-Code.png

    I was able to complete the dataport import process, this is my final code. 

    Thanks.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    You don't need to use Item.INIT statement and the IF condition to check for type::Item since you already have Item.GET statement. After Line No. Insert you just need this code

    IF Item.GET("No.") THEN

     "Description" := Item.Description;

    IF NOT INSERT THEN

    MODIFY;

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 > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans