You need to sign in to do that
Don't have an account?
sfadm sfadm
How to create a validation rule to deny all users creating new records except one?
I have a roll-up summary filed which is calculating the number of child records.
If the number of child records is greater than 2 I need to deny all users from creating new records except one.
I need to allow only one user / record owner to be able to create a third record.
I've created the following validation rule:
Please advise what else I need in my validation rule to give the opportunity to only one user / record owner to be able to create a third record?
If the number of child records is greater than 2 I need to deny all users from creating new records except one.
I need to allow only one user / record owner to be able to create a third record.
I've created the following validation rule:
my_custom_rollup_field > 2 && $ObjectType.Child_Custom_Object__c.Fields.Owner__c <> 'owner.Id'However that validation rule is not working.
Please advise what else I need in my validation rule to give the opportunity to only one user / record owner to be able to create a third record?
Try this validation rule.
Hope this helps.
Thanks,
Nagendra
All Answers
You need to create a validation rule on the object whoose record creation you wish to block.
So validation rule on child record would be as follows:
AND(PARENT_FIELD_NAME__r.ROLLUP_FIELD__c >=2 , ownerId != {USERID for which you wish to bypass validation} )
Cheers!!!!
Try this validation rule.
Hope this helps.
Thanks,
Nagendra
@Syed Insha Jawaid 2
I've created a validation rule in the child objec the way you suggested but it is not working at all.
Even if only:
It is still allowing my users to create third record.
Pleae advise how to create it in the parent object?
Could you please share the field level details and relationship of the object and current validation.
Just want to ensure if it is a custom rollup or not.
Cheers!!!