Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Programmatically create new item with web service

Posted on by 70

Hi.

I want to programmatically create new item and variant with a codeunit or page via web service. Any one know how can I do it?.

I supose that If i expose the item page, i can add new item as i can do in sales or purchase order... same with the variants... It's right?.

Can I do it exposing a codeunit as a web service and calling it with item name, variant name, cost and sell price as parameters?.

Thanks and best regards from Spain.

*This post is locked for comments

  • Verified answer
    Daniele Rebussi Profile Picture
    Daniele Rebussi 2,480 on at
    RE: Programmatically create new item with web service

    You can do it in both ways:

    - Exposing Item Card Page (moodle2.karelia.fi/.../view.php).

    - Creating and exposing a new codeunit with a function receiving all the necessary parameters (msdn.microsoft.com/.../dd339004.aspx).

    Personally I would prefer the second option because it allows to maintain more control on business logic.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans