You need to sign in to do that
Don't have an account?
NM Admin
Only one parent record per day, can have multiple child records for the same day.
Hello,
I have a scenario, I have a parent object 'A' with fields DateTime, User(Lookup),Address and child object 'B' with same fields.
How to restrcit user to create only one record per day? User can create multiple records for the same parent for the same day.
Welcome to youe suggestions!
Thanks,
Nilesh
I have a scenario, I have a parent object 'A' with fields DateTime, User(Lookup),Address and child object 'B' with same fields.
How to restrcit user to create only one record per day? User can create multiple records for the same parent for the same day.
Welcome to youe suggestions!
Thanks,
Nilesh
May I suggest you please check with below link from the stack exchange community with a similar discussion which might help you.
- https://salesforce.stackexchange.com/questions/125782/salesforce-validation-rule-only-create-1-record-a-day
Please let us know if this helps.Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
Any way to do this using apex only? Suppose I don't want to create a process builder.
Thanks,
Nilesh
If you don't want to create a new process. You can do the following.
1. Create a new text field with default value as today
2. And mark this field as unique
on the parent record.
1. When the first record is created the value would be updated with today's date
2. When the second record is created the record will not get created giving the Data Uniqueness Violation
Hope it helps
RD