- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 03:51 AM
Hii,
I have a requirement that is,
I need to restrict department record to set active false when it is referencing in any other active table records.
Can somebody please help me with this..?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 05:31 AM
So if the department is selected in any active record, it can't be inactivated?
Are we just talking about active tickets, or active everything (like locations, users, assets, cmdb, etc?). I think the only way to do this is to check where you are using it and do a validation on those fields. If you are lucky, you can simply run it on top tables (like 'department' field on task-level).
Create a BR on change of active field and let it abort if the check on any record is true (let your script run through all tables where you are using 'department'.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 05:31 AM
So if the department is selected in any active record, it can't be inactivated?
Are we just talking about active tickets, or active everything (like locations, users, assets, cmdb, etc?). I think the only way to do this is to check where you are using it and do a validation on those fields. If you are lucky, you can simply run it on top tables (like 'department' field on task-level).
Create a BR on change of active field and let it abort if the check on any record is true (let your script run through all tables where you are using 'department'.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark