You need to sign in to do that
Don't have an account?
rpataca
Validation Rule
Trying to create a validation rule to limit the number of lookup relationships to an object. I have an Athlete object and a Group object. Each Group needs to be limited to 10 Athletes. Once I add an Athlete to salesforce I use a lookup field to relate the Athlete to the Group. But once Group has reached its limit of 10 Athletes, I want an error message to display. How would I go about doing this.
Any help is appreciated.
Thank you.
Hope this helps.
[select count() from athlete a where a.group__c = :Trigger.new[0].group__c]
this tries to find all athletes that have the same group id in their group pointer.
then if count >10, fail by calling addError()
i've probably overlooked something, but it's worth a try.
I have looked for the apex code triggers but have not found them.
I have the professional edition.... is it available in my edition?
Thanks for your help guys, much appreciated.
Sorry.