You need to sign in to do that
Don't have an account?
Ashwini Sukumaran
Populate data from one record to another record
I have a custom object called "Returned Mail". This has a field called "parent record". This is a lookup to Returned Mail record (not itself, a different returned mail record).
Ex: Test 1 and Test 2 are returned mail records. Test 1 is a lookup on Test 2 and is called as the parent record. When someone creates a new record called Test 3 and tries to set Test 2 as its parent record then, they should be prevented from doing so and the field should populate to Test 1.
Ex: Test 1 and Test 2 are returned mail records. Test 1 is a lookup on Test 2 and is called as the parent record. When someone creates a new record called Test 3 and tries to set Test 2 as its parent record then, they should be prevented from doing so and the field should populate to Test 1.
I believe the value in the lookup you wanted to select are the ones that do not have any Parent Record. If that is the case you can use the filter of the lookup to consider only those values where the Parent Record = '' . This is one way to handle this but if you still wanted through code, we can still do that but as per recommendation this should do fulfil requirement.
All Answers
I believe the value in the lookup you wanted to select are the ones that do not have any Parent Record. If that is the case you can use the filter of the lookup to consider only those values where the Parent Record = '' . This is one way to handle this but if you still wanted through code, we can still do that but as per recommendation this should do fulfil requirement.
This works for now. Thank you so much! Appreciate the help.
Regards,
Ashwini