- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2017 08:04 AM
Hello
While trying to run a script to reorganize data, I keep running into a Data Policy Error. I'm not sure what is happening but it would appear that someone modified a data policy on the production system without testing it on the development system first. Whatever it is, it is preventing the script from updating the data I need to update in the script.
Is there any procedure that I can use to stop data policies from running so the script can run as intended? GlideRecord.setWorkflow (false) does not seem to have any effect. This is a one time script so I don't want to change anything or deactivate anything unless it is absolutely necessary.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2017 08:13 AM
Hello Tahnalos,
Use GlideRecord.setUseEngines(false); to disable Data policies.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2017 08:13 AM
You can create business rule to dynamicically activate or deactivate data policy.
You can glide to sys_data_policy2 table to deactivate your data policyin question and then activate it back after data processing is done.
REgards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2017 08:13 AM
Hello Tahnalos,
Use GlideRecord.setUseEngines(false); to disable Data policies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2019 01:46 PM
that doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 07:17 AM
Hi Pradeep,
setUseEngines(false) doesn't work in scoped application is there any other alternative?
We are using setUseEngines(false) in Scripted REST API.
Kindly sugest.
BR,
Meenal