Forum Discussion

BertusV's avatar
BertusV
Contributing Partner
5 years ago

Customer purchase order number format.

https://developer.myob.com/api/accountright/v2/sale/order/order_service/

 

the "CustomerPurchaseOrderNumber"  is sting 20 

 

When a user enter a purchase order number with leading zeroes I get a SerializationError "Input string '00124249' is not a valid number....."

 

Given that it is a string and some PO numbers may contain alpha character should this happen?  Should I test and see if it's a number present it differently?  Which other fields would this apply too?

 

Bertus

6 Replies

Replies have been turned off for this discussion
  • Hi Bertus,

     

    I have not tried the service order with the API and SDK  but with the item order

    https://developer.myob.com/api/accountright/v2/sale/order/order_item/

    it accepts a "CustomerPurchaseOrderNumber" with leading zeros or alphanumeric data.

    It does not like leading spaces however.

     

    If I create a service order directly in AccountRight it also accepts leading zeros and alphanumerics.

     

    Are you sure it is the "CustomerPurchaseOrderNumber" field giving the error and not the "Number" or some other field?

     

    John.

     

     

     

     

    • BertusV's avatar
      BertusV
      Contributing Partner

       This is the only place I saw the data in my customer's record.  

      • John_Dinning's avatar
        John_Dinning
        Trusted User

        Can you reproduce the problem yourself with a test company file?

        Maybe they are entering the "00124249" in the wrong field.

         

    • BertusV's avatar
      BertusV
      Contributing Partner

      Tried it in my system.  Works fine.  There always seem to be unreplicatable issues from this one customer.  They do have a slow internet connection.  Not that that should be the problem.

       

      Thanks for your input John.

      • John_Dinning's avatar
        John_Dinning
        Trusted User

        Sometimes the only way is to sit with the customer and watch them (maybe use TeamViewer) but if it's hard for them to reproduce too, you could be there a while.

         

        Good luck in tracking it down. 

    • BertusV's avatar
      BertusV
      Contributing Partner

      Tried that.  Tried saving logs. Debug viewer, etc, etc.  I have found some issues, but it's these curve balls that you just can't replicate.