I want to find a record by a value, and then delete it, the finding part is easy, but is there an API function that will tell me the RecordID, so that I can delete it using the newDeleteCommand?
Yes, there is. Once you have the record, use the getRecordId() method to retrieve its record ID. Example:
$recordID = $fmRecord->getRecordId();
Thanks, I had just found it myself.
Retrieving data ...