I would like to restrict the way my users can create a custom object record. Specifically, this object record is a child of a different object and should never be created without a reference to the parent. For a couple reasons, I don't want to create a Master/Detail relationship.

So my first thought is to create a quick action on the parent account. However, I don't like this option because quick actions require the record type to be selected, and we have about 10 different record types. I don't want to create a button for each.

So that leaves me with the option of creating a custom button/component. I can create a pretty simple component and replace the New button for the object. If on the parent object, it can easily reference the parent object record. My concern is that the object tab would still have the option to create a new child record, without reference to the parent. The only way to remove that is to change the object permissions. If I do that, would my custom button/component allow users to create a new record?

I know the easiest way to make this work would be to require the lookup field on the child object, but I am hoping there is a better way. Could I create the component and limit create access on the object? Would that work? Or is there a different option I have not considered?

  • 3
    Requiring the field is likely the best solution in this case. – sfdcfox Mar 1 '18 at 17:17
  • Yeah, you are probably correct. Thanks as always, @sfdcfox – Chance Mar 1 '18 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.