function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dandantedandante 

relationships and constraints

Hello,

I am looking for more traditional database-like behavior in Salesforce and have looked through the documentation but have not found answers to my questions. It could be I am looking in the wrong places and would appreciate pointers to the correct information.

Specific questions:
1) I'd like to make it impossible to create a Lead if a Campaign (or campaign id) is not included in the create call. I can do this programmatically, but is there a way to enforce this in the SF web app?

2) I added a custom field called Region to the Campaign object. There is also a custom Region object. I want to enforce the rule that a Campaign MUST have 1 *or more* regions associated with it. How can I do that? Again, I can enforce it in my code, but people may be adding campaigns using the SF UI. Is there a way I can enforce it there?

Thanks