Re: Is there a way to programatically set what user a function runs as
David Delač
11-8-19
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
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
Piotr Wycichowski
Thanks Gatis, anyway it seems to be reported as bug instead of wish because now it depends on who created task for whom, am I right? /Piotr W....
14:39 15 May 2024
Aldevinas Katkus
Actually a new version of this bug is SL>>Reports>>Periodic customer statement "accumulates" amounts Not sure why it was duplicated, I clicked "submit"only once....
08:09 10 May 2024