Custom field “copy change” ootb ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2023 09:48 PM
Hello,
We have a custom group field on change request form. And I have given that field name in system property so that when we “copy change” ui action that custom field also gets copied to new change request. But, if we create a change request with a group ‘A’ in the custom field and if that group ‘A’ is deactivated later and if we then use ootb “copy change” ui action the inactivated group ‘A’ is also copied to new change request. But I want to avoid copying inactive groups.
how can I do that ? We are using ootb copy change ui action.
Thanks,
Rocky.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2023 09:56 PM
This will be a complex change, if you go via updating the "copy change" Ui action because it used OOB script include.
There is a simpler solution to this, write a before insert BR on change table, with below script:
if(current.assignment_group.active==false)
{
current.assignment_group=' ' ;
}
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 05:02 AM - edited 01-09-2023 05:06 AM
Hi Raghav,
This did not work, though I have a before insert BR. The inactive group is still getting copied over to new change request.
The ‘current’ object refers to the original change request right? How will it refer to the new change request and make that field blank?
thanks,
Rocky.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 05:04 AM
Try below in same BR:
if(current.assignment_group.active=="false")
{
current.assignment_group=' ' ;
}
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 05:26 AM - edited 01-09-2023 05:27 AM
Hi Raghav,
No it didn’t work. I have also tried giving condition in the condition builder. Still no luck.
thanks,
Var**bleep**h Cherukuri.