Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Unit Test: Sales Order Lines failed to update in NAV 2013

Posted on by Microsoft Employee

I'm working on NAV 2013,

I had exposed Sales Order page as a web service and writing the unit test using that exposed web service.

FYI, I'm coding the scenario for sales order and want to run load test against unit test. so my concern is when updating sales order lines I'm getting salesorderlines object set to null.

newOrder.SalesLines = new SalesOrderService.Sales_Order_Line[1];
newOrder.SalesLines[0] = new SalesOrderService.Sales_Order_Line();
salesOrderService.Update(ref newOrder); // here I get newOrder.SalesLines[0] set to null.

Can anybody have an idea why it sets to null?

Help is appreciated. Thanks!

*This post is locked for comments

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Unit Test: Sales Order Lines failed to update in NAV 2013

    did you create the neworder object ?

    follow:

    blogs.msdn.com/.../extending-page-web-services-and-creating-a-sales-order-again.aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unit Test: Sales Order Lines failed to update in NAV 2013

    Can you let me know how to create the separate page set for this requirement? any links?

  • Jens Glathe Profile Picture
    Jens Glathe 6,092 on at
    RE: Unit Test: Sales Order Lines failed to update in NAV 2013

    Why do you construct Sales_Order_Line twice? AFAICR, this should work differently. Also, publishing a standard page as a web service is a bad idea. You have lots of clutter that you don't want or need in the resulting web service. Better to create a separate page set for this.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans