SBarnes wrote:Couldn't that cause a concurrency exception, if someone then edited the sales order?
Yes, but there is only so much we can do.
You could catch the concurrency exception and in the catch re-read the sales order then, set the custom field value (not call external API again - you'd already have the value you needed from it) and then save.
That would be good enough.