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
Rodolfo CP RitoRodolfo CP Rito 

Validation Rules when Clicking in a New Object

Hi,

I would like to create a validation rule that does not allow me to create a new object inside of a lead unless I have certain fields fulfilled.

User-added image

Could you please help me with code? 

Thanks
AG_SFDCAG_SFDC
Hi Antonio,

In order to acheive this create a validation on "Prospective Properties" object. You can reference the "Lead" object fields if  "Prospective Properties" has a look up relation with "Lead" Object.

For example you want RESTRICT a user from creating a "Prospective Properties" record if Lead Email is empty then you can acieve this by creating a validation rule on "Prospective Properties" Object. Please see screen shot below:

User-added image

You can click on Insert Field and select Lead field for the validation rule.

Let me know if this helped you!!

Thanks,
AG