Question
Plexus
ES
Last activity: 26 Nov 2021 10:33 EST
Delete masive record data type with activity
Hi,
I have a data type with multiple records. I'm using a Data Page savable to create and update records. But
How Can I delete records in my data type with an Activity? And How Can I delete relational records with my data type?
I got this:
Agreements > Key in mas concrete class is AgreementID AgreementsVersion > with AgreementID property relational and key is VersionID
Thanks!
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 26 Nov 2021 4:59 EST
Lventur
IN
Get all the needed information by using data page, loop the data page results and queue each instance entry to queue to processor. In queue processor activity have your logic to get all the related table information and delete all data instance.
If you are having delete logic in back-end then system will not take huge time, in a parallel way system will be deleting multiple records from table at a same time and easily you could handle exceptions also.
You could use Obj-Delete (or) Obj-Delete-By-Handle method to delete the records.
Aaseya IT Solutions
IN
@uNlove create a data set for that data type.
Open the data set and click on Run ,you can then select truncate option. Truncate option would delete ALL the records.
If you have to delete a specific record you can use obj-delete or obj-delet-by-handle.
-
Luisa Vidal
Plexus
ES
Thanks for the reply. I need to delete all specific records, not all record from data type.
So Need I to loop on my Data Page.pxResults and do obj-delete for each loop?
Accepted Solution
Updated: 26 Nov 2021 4:59 EST
Lventur
IN
Get all the needed information by using data page, loop the data page results and queue each instance entry to queue to processor. In queue processor activity have your logic to get all the related table information and delete all data instance.
If you are having delete logic in back-end then system will not take huge time, in a parallel way system will be deleting multiple records from table at a same time and easily you could handle exceptions also.
You could use Obj-Delete (or) Obj-Delete-By-Handle method to delete the records.
-
Raju Botu
Plexus
ES
Thanks,
I looped my Data Page pxResult, and made an Obj-Open and after this, Obj-Delete and its ok for me.
I have one question. Is necessary do a Obj-Open with a Page and then use Obj-Delete?
Lventur
IN
If you are going for this approach, then try to get the pzInsKey of data instance and try to use Obj-Delete-By-Handle method.
By using this method you would be able to delete the instance directly. Attached screen-shot for reference.
-
Luisa Vidal
Updated: 26 Nov 2021 6:31 EST
Plexus
ES
I got this (In Page-Copy) I'm copoying in to my page Objetivos DataPage current result page
I think I need to do Obj-Open for take my Class Key, if I use Obj-Delete-By-Handle method how can I take my pzInsKey if not doing Obj-Open? Because Im Working in Data- class and my Data Page pxResult don't have pzInsKey. So I think I need to do Obj-Open in both approach and its the same if I use Obj-Open or Obj-Delete-By-Handle With this approach at the moment, I'm removing my records, but I don't know if it is the best practice. Do you think its that ok? Thanks so much.
Lventur
IN
Yes.. I missed that for Data- class you would be able to use only Obj-Delete. Because pzInsKey will not be avail for Data- customerdata schema table.
-
Luisa Vidal