Is there a way to delete a CRM record using a custom function in CRM?

Is there a way to delete a CRM record using a custom function in CRM?

What is the best way to delete a record using a custom function?  I've got a rather complex function and one of the steps based on a series of conditions is to covert a lead to an opportunity and then remove the lead, only I can't seem to find a way to delete the lead. In my searches I'm finding the Data Access tasks in Creator, but there doesn't seem to be anything like that in the CRM Custom Function script writer.