I've got a headscratcher. I'm creating a customer-subsidiary relationship record. It is rejecting the subsidiary ID (13) as invalid. The same code works if I give it a different subsidiary ID. I can manually add the subsidiary it refuses in code in the UI.
So I'm thinking it must be some kind of permissions thing, but the role the code runs in is set to access all subsidiaries.
Any ideas where I should look?