How to delete CI only by keeping asset record in Asset Table..

nicknick
Tera Expert

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

 

8 REPLIES 8

Mike Allen
Mega Sage

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.

Hi Mike, Please let me know where and what changes need to do. Regards, Nick

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();

Hi,

 

Created "New Delete" button as below but still both CI and Asset gets deleted. Please suggest. As I was not sure, I tried with setWorkFLow() & setWorkflow() function.

find_real_file.png