Hi Håvar,
You can find where UserCanAction("InvOK",true) is used and add additional case that would check if RecordUpdate has been called from Maintenance or not. We have primitive IsMaintenance() that can help you achieve this check.
Example of how it can be done:
if (UserCanAction("InvOK",true) or IsMaintenance) then begin
//do something
end;
Just for future reference we also have HAL Primitives website with all this information:
http://halforum.hansaworld.net/primitives/procedure/IsMaintenance
Best Regards,
David D.
HansaWorld