How to delete current record in a business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 07:12 AM
How do you delete the CURRENT record in an on-after business rule?
We have a checkbox that's part of another process that, when checked, will trigger the deletion of the current record.
Is there something like current.delete? Or do I need do to a glidequery back to the existing record to delete it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 07:17 AM
Hi, current is already a GlideRecord of the current record, that is, you can use current.deleteRecord()
If my answer helped you, please mark my answer as helpful.
Vanderlei Catione Junior | LinkedIn
Senior ServicePortal Developer / TechLead at The Cloud People
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 07:18 AM
Did you try current.deleteRecord(); ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 07:23 AM
Hi,
Why to have a checkbox, and then user checks the box and saves the recrd which triggers instant deletion>?Why not just have a delete ui action for better user experience.
Also why delete, cant you just deactivate the data? It doesn't sound like some transitional data if user is taking action on it.