Forum Discussion

sajju's avatar
sajju
Contributing User
3 years ago
Solved

Getting Validation exception error while trying to post a service bill using .Net SDK API

Hi Guys,   I am trying to post a purchase bill service using .Net SDK. Getting a validation exception error. So far I was unable to figure out why. Can anybody guide me on this? Here's the code tha...
  • John_Dinning's avatar
    John_Dinning
    3 years ago

    I don't think those fields are required but you could try.

    My guess is that it it something to do with the line.Total. I think this is restricted to 2 decimal places.

     

    I haven't tried this with validation errors but I think if you cast your exception to ApiValidationException then you can access a collection of errors which may give you more information. Something like this:

     

    System.Collections.Generic.IList<MYOB.AccountRight.SDK.Error> ErrList = ((ApiValidationException)(TheException)).Errors;

Looking for something else?

Search the Community Forum for answers or find your topic and get the conversation started!

Community home

Level up your skills using MYOB software.

 

Find help guides and technical solutions for all MYOB products here

Explore video tutorials for our software at the MYOB Academy here

 

Dig into MYOB Academy for free courses, learning paths and live events to help build your business with MYOB.