- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 08:18 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 10:24 AM
Dear @vinaykumar,
try below script in onchange client script - it gives solution for Copy change UI action performed as Copy change will always creates new record and we are checking whether new record or not - !g_form.isNewRecord()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 01:44 PM
Hi @vinaykumar
It looks pretty bob on if I’m honest. Only thing I can think is if you’re adding the cmdb_ci field as rhe trigger on the client script.
Please mark as helpful or if it’s resolved the issue, CORRECT!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 07:48 PM
Hi @vinaykumar ,
What was the issue that you're facing here?
Are you able to pass & retrieve values from the Script include?
Please add them once & try. Do let me know if it's still not working so that I could look furter.
Thanks & Regards,
Madhan Somesh.
Can you confirm it by adding few logs/infos in your client script & the script Include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 07:54 PM - edited 02-18-2024 08:02 PM
@Madhan somesh yes, we are able to retrieve values from script include. problem here is when i try to edit or clear fields - supplementary approver and business approver and save then its not saving and retaining values from script include. Also when copy change UI action is triggered these 2 fields should populate based on CI selected which is retrieved from script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 08:09 PM
Hi @vinaykumar ,
As UI actions are server-side they won't execute on client-side changes.
But you can trigger the client script based on UI action click using the below code in the client script.
if (g_form.getActionName() == "UI_action_name"
Thanks & Regards,
Madhan Somesh.