Hello Salesforce Cody’s, Welcome back after a long time. Let’s do a quick Beginner/Intermediate level trigger.
trigger delContacyTrigger on Contact (after delete) {
List<Id> accId = new List<Id>();
for(Contact c : Trigger.old){
accId.add(c.AccountId);
}
List<Account> accdelete = [select Id from Account where Id IN :accId];
if(accdelete.size() > 0){
delete accdelete;
}
}
Let me know in the comments if any doubts?