"Delete source after conversion" not working in da

Posted by Rollbase User on 03-Jul-2012 15:59

I have a create record trigger that runs after create on "object1". The trigger uses a data map to convert a record from "object1" into "object2". This trigger has the "Delete source...after conversion " box checked. The record in "object2" gets created perfectly. However, the source record does not get deleted as expected. What are some potential causes of the "delete source after conversion" option not working correctly? I have all "add", "edit", and "delete" permissions enabled on both objects and a one-to-one relationship established between the two objects When the trigger runs, the data gets correctly converted

All Replies

Posted by Admin on 03-Jul-2012 16:00

Also, the trigger is delayed.

Posted by Admin on 03-Jul-2012 17:51

I shall check this

Posted by Admin on 03-Jul-2012 18:41

Hi,



While Pavel is checking, you might want to try :

- After your create record trigger on Object 1, you can add an object script containing rbv_api.deleteRecord api call to delete itself.

- Make sure this is after the data map fires so that it doesn't delete itself before conversion.



Hope this helps,

Piscoso, Martin

Rollbase

Posted by Admin on 03-Jul-2012 18:42

Or, you may want to try deleting the record using said API before you do the conversion, this is something that I haven't tried but worth giving a shot.



Stack:

>> deleteRecord

>> return true on data map to convert to object 2.



This "might" work better with your delayed trigger scenario

Posted by Admin on 03-Jul-2012 21:43

"Delete" option has no effect if Conversion Map is used in Workflow Action or Trigger: you cannot delete record which is being processed.



Posted by Admin on 05-Jul-2012 09:13

Thank you both very much. Creating a delayed Object Script trigger using the rbv_api.deleteRecord api call in conjunction with a Create Record trigger using the Data Map worked perfectly.

This thread is closed