created by field in sys_journal_field table populated from where?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 04:25 AM
I have BR works on incident table with when is before inserted or updated
based on some condition I insert additional comment using this command
current.comments="some text here";
and it appears correctly but it sets the created by to me" current user" instead of system
how can i solve this or edit it to make the created_by field to system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 04:49 AM
What happens if you do it 'after'? I didn't try it (my pdi is sleeping), but on the before I am sure the business rule will set the created by as the user triggering it. If after does the same, a flow running as system will surely put 'system' in there.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 05:10 AM
I've tried to change it to before but nothing change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 08:26 AM - edited 05-31-2024 05:24 AM
Hi @Mohamed Taha ,
Did you try adding one more line current.autoSysFields(false); in the br ?If not please do give it a try and let me know if this does not work for you.
Else you can try something as below,
current.comments.setJournalEntry('some text here', 'System');
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2024 12:50 AM
Do I need to change the BR to after instead of before or it will work with before ?