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
Globe Salesforce AdminGlobe Salesforce Admin 

Making a related list part of a validation

Hi,

 

I am trying to figure out how to make a related list mandatory on a custom object.  In other words my custom object shipping requests must have at least 1 shipping item which is my related list.

 

All assistance is appreciated.

 

Thanks Kindly

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,

 

If you can create a Rollup Summary to the parent object that counts the number of related records, you could use that in a Validation Rule to make sure at least one Rollup Summary.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

All Answers

Navatar_DbSupNavatar_DbSup

Hi,

 

If you can create a Rollup Summary to the parent object that counts the number of related records, you could use that in a Validation Rule to make sure at least one Rollup Summary.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

This was selected as the best answer
Globe Salesforce AdminGlobe Salesforce Admin

Super!  thanks so much it works exactly the way we need.

 

thanks again.