0

I am using the SOAP API in Acumatica to import customers as it’s so much faster than the rest API when dealing with a lot of data. I’ve created a new field on BAccount which is a Boolean. This field is added to both the customer and supplier screen. I can import suppliers fine, but for customers I get an invalid cast error. The value being passed is True as a string, but that works with standard Boolean fields, fine on supplier with the same field, but customers it gives the cast error.

dev test
  • 1
  • 1
  • For booleans, try 0 for false and 1 for true. Not sure if it will work, but worth a shot. Booleans in Acumatica are stored as bits in SQL. – Brian Stevens Sep 24 '20 at 22:23

1 Answers1

0

The issue was due to field updating event for the field. When i debugged it during the import the field value was set to true. It hits this event lots of times and occasionally it pushed the value from a different field, the customer name which isn’t a Boolean. I’ve never seen the field events get the wrong value before, but I refactored the customization so didn’t need to use the event value anymore

dev test
  • 1
  • 1