How to delete CI only by keeping asset record in Asset Table..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2019 11:34 AM
Hi,
Please let me know the procedure how to delete the CI only . But customer want to keep the Asset Recordi in asset table. I even tried cascade deletion option with "clear" choice but post this also, both CI and Asset records get deleted.
Though I know the deletion of Ci is not recommonded but but still want to go for the same due to business requirement.
I have created UI action for Delete and copied same script of OOB "DELETE" button for UI action by removing cascade delete but same is also not working and both CI and Asset gets deleted.
Please let me know how to break the link between CI and asset.
Regards,
Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2019 11:44 AM
In your business rule, have you tried setWorkflow(false)? I think that there is a business rule that keeps the two together, and setWorkflow turns off business rules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2019 11:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2019 12:10 PM
I would create my own delete button so I am not messing with the global system. In it, I would put the code to delete the record. In that, I would use the setWorkflow(false).
current.setWorkflow(false);
current.deleteRecord();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2019 12:51 PM