- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2019 12:55 AM
can anyone explain me why using current.setWorkflow(false) should not be followed or is it an unethical way?
and if i use would it be a wrong method for a developer
curious to know just for knowledge
thanks
Solved! Go to Solution.
- Labels:
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2019 03:23 AM
Hi,
In this current case, where the requirement is to have CR state to be closed (instead of cancelled) When it is rejected.
The OOB BR restricts the change of state.
Hence suggested to use setworkflow(false) in the run script so that the Br does not run on this record and the state is changed to closed.
Kindly mark the comment as a correct answer and helpful if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2019 10:14 PM
Prior to updating your task, add a call to setWorkflow(false)
on the GlideRecord object for the task within the business rule that is updating the task. This prevents the business rules from being processed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2019 01:12 AM
hi
according to you which br should be stop if i stop this State model - Can change state? this will affect others too which i don't want

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2019 03:23 AM
Hi,
In this current case, where the requirement is to have CR state to be closed (instead of cancelled) When it is rejected.
The OOB BR restricts the change of state.
Hence suggested to use setworkflow(false) in the run script so that the Br does not run on this record and the state is changed to closed.
Kindly mark the comment as a correct answer and helpful if it helps.