You need to sign in to do that
Don't have an account?
Agnibha Chakrabarti 10
validation rute on junction object
hi,
i have 3 objects,
1.Batch
2.student
3.student batch junction
now,my requirement is- after a batch is completed(a checkbox is checked), no one candelete the record of Student related to that batch.
I wrote a validation rule on Student batch junction-- (Batch__r.complted__c =true) && ( ISNULL(Student__r.Id ))
but it is not working
i have 3 objects,
1.Batch
2.student
3.student batch junction
now,my requirement is- after a batch is completed(a checkbox is checked), no one candelete the record of Student related to that batch.
I wrote a validation rule on Student batch junction-- (Batch__r.complted__c =true) && ( ISNULL(Student__r.Id ))
but it is not working
You should try options like:
1. Write a trigger(before delete) event and then check the respected Studnet batch junction>>batch object status completed or not. Based on that use adderror function to stop users from deleting.
2. If just want to control from UI, can try to create anothe record type for student without any button. Update the record type of student record using apes on Batch object trigger when ever batch is getting completed.
following your option 1 i wrote a trigger
but it is not working!! can you help me with this?