2

I have a Contract__c object and a Auths__c object.

The Contract__c object has a lookup to Auths__c, and when a record from Auths__c is bound to Contract__c I don't want the user to delete the Auths__c record. Is that possible? Tia

2 Answers 2

4

With custom relationships, such as this field, you can go to the Contract__c object, edit the field that looks up to Auth__c, and set the "What to do if the lookup record is deleted?" section to "Don't allow deletion of the lookup record that's part of a lookup relationship."

0

Solution above does not work. Using Summer 16 release, the option to change the action when the lookup record is deleted doesn't appear.

2
  • Really? Still there for me. Be interesting to see a screen shot here and verification that it is a lookup relationship
    – cropredy
    Aug 12, 2016 at 14:42
  • As it turns out, there are special considerations when the lookup points to a lead. In the latest release, there's no control at all - the lookup field will be optional, and the action on delete will be to clear the field. So to protect a lead from being deleted when it has related records, you must either use master/detail instead of lookup (a problem because the lookup field might not be required), or write a trigger (a problem because, well, triggers). I put an idea (success.salesforce.com/ideaView?id=0873A000000E3kgQAC) on the SF site to give us back some flexibility. Sep 15, 2016 at 20:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .