System user
From iDempiere en
- Contributor: hieplq (talk)
- Refer: https://idempiere.atlassian.net/browse/IDEMPIERE-2339
Issue
1. Column AD_User_ID in table referrence to AD_User only accept value > 0, when pass value < 1 by call Model.SetAD_User_ID it auto convert to null when AD_User_ID is requirement, we can't set null value for it. example table:MClient, DashboardController, CustomizeGridViewPanel, WGadgets, ...
2. User System has AD_User_ID = 0. it represent for "SYSTEM"
3. when we write process accept AD_User_ID to set to there table, when process run will System user code will make error. ERROR: null value in column "ad_user_id" violates not-null constraint
Solution
when set value for column AD_User_ID of there table, in case we wish code run with SYSTEM, call PO.set_Value