- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2018 02:12 PM
I have had some trouble making an BR that copies close notes from SC Task to request table (preferly it only adds info and not delete if field allready has txt in it )... Problem is i dont see what the error is...
Please check screenshots
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 12:12 PM
You should be able to do this with a single 'After' 'Update' business rule on the 'sc_task' table. The business rule should run when the Close notes field changes and the Close notes field is not empty. Here is the script...
(function executeRule(current, previous /*null when async*/) {
// Query for the Request parent
var req = new GlideRecord('sc_request');
req.addQuery('sys_id', current.request_item.request);
req.query();
if (req.next()) {
// Add current close notes to request close notes
req.close_notes = req.close_notes + '\n' + 'Close notes added from ' + current.number + ':\n' + current.close_notes + '\n';
req.update();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 09:48 AM
Try this code and business rule to run on 'Display'.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var request =current.request.getRefRecord();
request.u_summary = current.variables.Summary;
//request.update();
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 11:08 AM
Unfortunly it doesnt work either still field empty..
Is it possible to add the req.close_notes field to SC_task form and update it from there ? I tried it, but i cannot make an acl work to make it editable from task form.
Anyhow the BR still doesnt work for us..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 11:35 AM
Hi Jay Jay,
You won't be able to dot-walk from the parent REQ to a child task, but you could use a business rule on RITM and dot-walk to the REQ close_notes.
I might do something like this:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 11:49 AM
I found a way to do this by first copying the close notes from task to request item and then to copy from request item to request.
This works for me.
1. Write a business on sc_task
2. Write a business rule on sc_req_item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 11:58 AM
