Update fields from parent ticket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2016 11:18 PM
Hi Team,
I have an issue where I have fields in a task that get information from a parent ticket and displays it in the task. This is to allow the users to see this information without having to switch between tickets.
I have a Business Rule set to "Display" that will update the fields with the information from the parent ticket
eg:
- current.u_dmn_business_benefit = current.parent.category;
- current.u_dmn_type = current.parent.type;
This works as expected in the display mode (if changes are made to the parent ticket then when the task is opened the changes are displayed accordingly.
However, the trouble I have is that if I then list the tasks the changes do not appear to take have taken affect at that level.
What I believe is happening is that my BR is changing the view to show the correct details but not updating the field in the ticket. So when I go to the list view it shows the original and not the most recent field contents.
I have attached a document with screen captures to help explain.
What is the desired outcome is that the task will have the correct information from the parent ticket when it shows in the list form (ie the data in the task field = data in the parent field)
Any ideas?
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2016 11:26 PM
You have to use after update business rule.
As you want to save this changes to database rite,
and one quick question...in screen i am confused.....what it not getting saved can you please tell me....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2016 11:35 PM
HI Andrew,
There are two solution of this problem :
First is, instead of display business rule, use after update/insert business rule on parent task.
After update business rule will update the child table record as soon as the record updates in parent table. In this case you need to glideRecord on child table like below :
var child = new GlideRecord('child_table_name');
child.addQuery('parent', currnet.sys_id);
child.query();
while(child.next()) {
child.u_dmn_business_benefit = current.parent.category;
child.u_dmn_type = current.parent.type;
child.update();
}
Second solution is to use OOB(dot walking) functionality , This is recommended and best way :
You can add the parent table field directly in form layout, and list layout. So that user can see the parent field in child table form as well as child table list view.
Suppose you want to add Request(parent) table filed on Request Item(child) table, follow below steps :
Got RITM form, configure form layout :
Click om expand selected reference highlighted in yellow.
Select the parent(request field as above)
Save the changes.
Same you need to follow in case of list view : Go to configure list layout ---> and change the layout as par above screen shots.
Thanks,
Param
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2016 07:23 PM
Thanks Param,
Very good ideas, one of the issues I had was that when I ran reports from the "Enhancement" table. It provided opportunities for me to look at the "Parent" fields but it did not link directly to the "Demand" - ie it did not show all fields from the Demand ticket, just the fields from the highest level "Task" table.
I feel this was probably a database view so I looked at creating a database view linking enhancements to demands to ensure the ability to view fields from the Demand table. This did not work as I expected.
With your example above where the "Request [+]" was available this was not visible as "Demand [+]" which was my issue.
Going back to the report I have been able to determine that the report (running from the Demand) table now only reports demands that have an open enhancement linked to them.
Thanks for the help
cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2016 10:15 PM
Yes Andrew,
In case of report we can resolve the issue by creating database view. If parent field are not present in child then you can look for after update/insert business rule.
Thanks,
Param