How to access nic and nic.cmdb_ci field values using After BR?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi,
I want to create relationship record between ip address and network table after discovery is completed. So, I wrote an after insert BR rule on ip address table and create a relationship record. Before creating relationship record i want to verify if current.ip_address is same as ip address on its discovered CI. so, i am trying to get nic and nic.cmdb_ci field values from ip address record and i am failing capture them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
BR is on which table?
share some screenshots
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
Monday
BR is written on ip address table.
I have not written whole code. Currently i am looking for ways to implement it. So open for ideas. I thought i can do it through after insert BR. and i am stuck with basic log statement i wrote in description. I want to know what all fields i can access through "current" object and then write the logic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Adding the code i wrote:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday - last edited Monday
When you create a business rule on table, it becomes the current object. For example, if BR is on ip_address table, current.ip_address_field would give value of current record for which BR is executing.
Take for example below BR on cmdb_ci table, current.<any cmdb_ci table fields> or current.<dot-walked fields of cmdb_ci table> can be used for current object. If you want to compare field values of current table with another table fields, you need to use glide record class and compare current object field(s) with glide record field(s).
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan