MYOBCommunity
Partner Zone
|
|
Partner Zone

Not able to update the purchase order detail

1 REPLY
MYOB Staff Post DeveloperJack
133 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

133Posts

28Kudos

17Solutions

Re: Not able to update the purchase order detail

Hi there @AparnaRajagopal,

The best place to get support for MYOB Advanced developer/integrations is to reach out to the advancedisvs@myob.com team.

Cheers!

Jack

Jack Skinner
MYOBapi Evangelist

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/
Partner AparnaRajagopal
1 Post
Partner
AparnaRajagopal

1Posts

0Kudos

0Solutions

Not able to update the purchase order detail

Hi,

 

I am trying to update the purchase order details through MYOB API call. I am able to do all the CRUD operations in the top level, but not able to update the inner details. I am not getting any exception as well.

 

In my code i am trying to update the quantity of the product, but it is not getting update.

Provided the code below for reference. 

 

public static void UpdatePODetails()
        {
            using (DefaultSoapClient soapClient = new DefaultSoapClient())
            {
                Console.WriteLine("update a purchase order... updating order line details");
                WebServiceConnector.InitializeWebService(soapClient);
    
            try
                {


                    PurchaseOrder poToBeFound = new PurchaseOrder
                     {
                     OrderNbr = new StringSearch { Value = "000006" },

                     };

                 PurchaseOrder order = (PurchaseOrder)soapClient.Get(poToBeFound);

                    PurchaseOrderDetail orderDetail = order.Details.Single(
                        x => x.InventoryID.Value == "PEN");

                       orderDetail.OrderQty = new DecimalValue { Value = 40 };

     

                      order = (PurchaseOrder)soapClient.Put(order);

                     Console.WriteLine("Order type: " + order.Type.Value);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    Console.WriteLine();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadLine();
                }
                finally
                {
                    //Log out from Acumatica ERP
                    soapClient.Logout();
                }

            }

        }

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post