O
Orchid Corpin
Guest
Hi matman, To delete detached records you compare the before values and current values of a child lookup, see sample code below just change the R56036 and 'product1': var before = new Array({!R56036#before}); var after = new Array({!R56036}); var detachItem; for(i=0; i before.length; i++) { detachItem = after.indexOf(before); if(detachItem == -1) rbv_api.deleteRecord("product1", before); } Also you cannot see the #before values inside edit trigger debug since all records are already updated. You can use debug beside the New Trigger and Run Trigger then just add rbv_api.println(before); in the code above. Once you click the debug button a new window will open and try an actual editing of record then refresh the debug window to see the results. Hope this may help. Regards, Orchid
Continue reading...
Continue reading...