Hello,
I have scenario where I have created scheduler in System client executing on process created in report and process. When the process is executed, I am inserting/updating data into many tables. Now when inserting/updating records to multiple, I need to set the AD_Client_ID and AD_Org_ID to each record. As I have created scheduler in System Client process will be executed from System Client and context parameters will have AD_Client_D and AD_Org_ID of System which 0, 0 respectively, so I have set AD_Client_ID and AD_Org_ID by iterating over each Client and Org into Env as below
- Env.setContext(getCtx(), "#AD_Client_ID", AD_Client_ID);
- Env.setContext(getCtx(), "#AD_Org_ID", AD_Org_ID);
Will above work when normal user would be accessing the idempiere from webui and creating records ?
What if I want to insert/update records in multiple client and org from single scheduler process ? If I create scheduler in each different client instead of System client and that scheduler will execute the same process java class then do I need to make Process synchronized by making doIt or custom method synchronized ?
Thanks in advance,
Pritesh