I did an SOOrderExtension, in which I overwrote the Persist method to add another method when saving, I call baseMethod() before and after my custom method.
This method creates a SegmentValue and an associated Sub. Now I want to save the SubID in the SalesSubID-Field of the SOLines of the Order. I get an Error that the Sub does not exist in the System. If I press Save again, everything will work just fine.
I tried clearing the Cache of SegmentValue and Sub, I tried clearing all the Caches. I tried using the Sub Graph to update SOLines fields.
Does anyone have an idea how I can fix this?