on 05-26-2016 10:50 AM
Hi All,
Is there any way so that i can delete entries from BO using a action.
Regards,
Atul Malhotra
Hi Atul Malhotra,
Please write this statement in your custom action.
CustomBOName.QueryByElements.Execute().Delete();
Using this single statement you can delete all records from your custom BO.
Regards,
Mithun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This is because when you delete instance it will only delete the instanaces but does not commit the delete.
if you are calling your custom action in EventHandler under BOAction you will see checkbox ExecuteAfterSave, You should check this checkbox, and after the calling Deleteinstance .Delete() it will commit the delete.
Regards
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil.
If the Action is being called from MDR job , what statement to put after : Deleteinstance .Delete()
In my case i want to delete a subset of data from Custom BO.
So Deleteinstance in my case has set of records that i need to delete from Superset BO.
So in below after BO.Delete what will help to commit delete.
Hi Atul,
Create a custom action and write a code to fetch and then delete all the entries from a Custom BO.
var CustomBO= CustomBO.QueryByElements; | |||
var CustomBODelete = CustomBO.Execute(); Foreach(var Deleteinstance in CustomBODelete) { | |||
Deleteinstance .Delete(); | |||
} |
Thanks and Regards,
Ajith J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.