- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 05:17 AM
How to assign assets in Servicenow HAM to "Last logged on User" if "Primary User" is same as?
How to set Assigned to in 'alm_hardware' Table in Servicenow HAM to "Last logged on User" of cmdb_ci_computer table if "Primary User" is same as "Last logged on User" of 'cmdb_ci_computer' Table?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:47 PM
Issue Resolved.
Please find below Code:-
Script Include:-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 10:23 PM
when should this happen?
where are you planning to write script for this?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 10:55 AM
Hi Tushan,
We have to check condition in cmdb_ci_computer as you mentioned and set value in alm_hardware table.
Please confirm where should I write the script,
1)In Client Script
2)In Fix Script
3)Background script
4)Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 08:00 PM
where to write the script depends on your use-case
1)In Client Script - if you want to see the real-time change on UI
2)In Fix Script - this is like a 1 time activity and you want to update all the records
3)Background script - not preferred
4)Business Rule - when you want to see the change once record is saved
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 08:42 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 10:28 AM
Hi Ankur,
To set value based on condition on another table in servicenow.DO WE NEED TO WRITE SCRIPT INCLUDE? and where to write the script mentioned in the post by Tushar?