mibuso.com

Microsoft Business Solutions online community
It is currently Tue May 21, 2013 8:55 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: New salesorder from webservice.
PostPosted: Mon May 07, 2012 9:08 am 
Offline

Joined: Wed Sep 20, 2006 2:43 pm
Posts: 35
Location: Sweden
Country: Sweden (se)
Hello,
I am testing a webservice to insert new salesorder into nav 2009 r2 build 32982
Inserting the order with service.create(ref order) works ok but when I try to set customer no and updates the order with service.update(ref order) I get a null reference exception.
Error from Visual Studio is
"Soapexception was caught" - "Object reference not set to an instance of an object."

Anyone?
Code: Select all
        Order.Order_Service service = new Order.Order_Service();
        service.UseDefaultCredentials = true;

        Order.Order order = new Order.Order();
        order.No = "WEB023";

        service.Create(ref order);

        order.Sell_to_Customer_No = "09864534";
       //order.SalesLines = new Order.Sales_Order_Line[5];
        //for (int i = 0; i < 5; i++)
        //    order.SalesLines[i] = new Order.Sales_Order_Line();
        try
        {
            service.Update(ref order);
        }
        catch (Exception ex)
        {
           
        }


Top
 Profile  
 
 Post subject: Re: New salesorder from webservice.
PostPosted: Sat May 12, 2012 2:02 pm 
Offline

Joined: Fri Jul 08, 2011 10:20 am
Posts: 16
Country: Switzerland (ch)
Hi,

I suggest you begin to use DebugMode with the middle tier services. You will certainly find it useful in the future, particularly if you have custom code in your NAV triggers.

here, you will find the procedure to that: http://blogs.msdn.com/b/nav/archive/200 ... -2009.aspx


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: