the importance of inc.autoSysFields(false); & inc.setWorkflow(false);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2016 05:42 AM
Why is it important to have these two on business rules?
inc.autoSysFields(false); &
inc.setWorkflow(false);
I noticed I will loose my activity log ( work_notes) filed for instance and i need that.
The question is? are they really necessary ?
the BR is running on [sys_user] table.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2016 05:49 AM
The line-
inc.autoSysFields(false); - disable the update on sys_updated_on, sys_updated_by, sys_mod_count etc.
This is primarily used, if through script if you dont want to keep track of who has updated the record
Section 10.1 autoSysFields
inc.setWorkflow(false); - this will prevent all Business rules from firing, if you want to make an update on the table but you dont want any business rule to fire up
Section 10.2 setWorkflow
then the above lines are used, primarily this line is used along with
After business rule
And that business rule has the script current.update();
Most probably the business rules which are using these lines doesn't want either tracking or firing of business rules.
Mark if it is correct or helpful, feedback is appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2016 05:53 AM
Thank you so much for ur response. actually my BR is on before! so do you think I can remove these lines from my script?I really need the activity log to be shown!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2016 06:06 AM
Usually its not advised to use these lines until unless your design needs it.
For ex: In fixing some data in the table, we end up writing a fix script, in that we wont be needing to trigger business rules or capture the update in the history.
In these cases we regularly use these lines.
If your design doesnt demand these requirements then you can remove them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2016 06:09 AM
Thank you so much! I don't think my design needs them as I'm just removing inactive people from their assigned tasks.