- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 02:38 PM
Hi,
I have been trying to auto populate description value from a Change Request to Change Task. Not having any luck Been trying to use
Business Rules.
At present, we have a standard change template that has change tasks automatically populated through Execution Plans.
I would like all the change tasks to have the description field to be the same as the parent Change Request's description upon creation of the tasks.
I've read different posts here but most are scripts for workflow. But I'm not using a workflow. Is there a Business Rule script/set up I could use to do so?
Your help will be greatly appreciated. Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 03:30 PM
Hi Peggy,
Your script seems to be fine.
Are you sure, the 'Description' value from Change request does not copy over AFTER you insert the Change-Task record ?
I've just tried the below in my personal instance and working as expected:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 03:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 03:15 PM
You're missing:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.description=current.change_request.description;
})(current, previous);
harel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 03:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 03:43 PM
Put a gs.log() statement in your script and see if log shows it.
On Tue, Jan 17, 2017 at 17:35 peggy <community-no-reply@servicenow.com>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 03:30 PM