Skip to Content
0
Former Member
Apr 15, 2010 at 11:30 AM

Fun with upating Service Contract and Middleware

37 Views

Hello all,

I'm trying to update a field on the Service Contract at save, unfortunately this field needs to be populated with the contract number (OBJECT_ID) so I can't use the BADI as on create I dont' have this field yet.

I've put some code in the Save action in the UI which runs immediately after save. The issue is that the middleware is still distributing the data for a few seconds after this and I get the error:

<code>The document is being distributed at the moment, and therefore cannot be changed</code>

I have put in checks on the entity and transaction to check if I can change the entity put they are coming back OK and I think this is seperate from this. I can't catch the middleware exception either as it's handled further down the call chain. Does the BOL know about the Middleware? Is there a way to check if the Middleware is distibuting the document?