Create a field on cmdb_ci table in a domain separate enviroment

Shusovit Dutta
Tera Contributor

Hi, 

I am planning to create a custom checkbox on cmdb_ci table, on a particular domain. how do i make sure if that field is not accessible (read/write/update) by other domain users. 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Shusovit Dutta 

you need to handle this using field level READ, WRITE ACL on your cmdb_ci.<customFeld>

Use advanced script

answer = gs.getUser().getDomainID() == current.sys_domain;

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@Shusovit Dutta 

you need to handle this using field level READ, WRITE ACL on your cmdb_ci.<customFeld>

Use advanced script

answer = gs.getUser().getDomainID() == current.sys_domain;

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Dr Atul G- LNG
Tera Patron

Hi @Shusovit Dutta 

Rather than ACLs, check whether the other user has visibility into the domain where you are creating this. If they do, then it will not be visible to you—this is the expected OOTB behavior.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

MalikB
Tera Contributor

Hi @Dr Atul G- LNG, @Ankur Bawiskar ; I have almost a similar question however i created a field in table "cmdb_ci_handheld_coputing" Type : True/False with default value to True and read only i can see the field in the form new form had the value true as i created it however old records existing before the creation of that field have it but not as true why? how can i resolve that problem?