0

1.- Create an object called A, with a date field called DateA - Create an object called B, with a lookup field to A and a date field called DateB

2.- Create a trigger that will set the DateA field as the highest of the children's DateB field

3.- Create a VF page that will receive the id of an A object and will allow you to mass edit the DateB fields on the child B objects, in a table .

I have done the 1.st point, I have created an object called A with a date field called DateA and I have created another object called B with a lookup field to A and a date field called DateB. I learn triggers from youtube but this is something which I dont find anywhere,so I have difficulty at the 2nd and the 3rd point. Any suggestion or help would be much appreciated. Thanks in advance.

0

for #2, why have a trigger? If you only want the highest date from your child records - you can use a rollup summary field. You can take the "MAX" option returning for the date field you want which will give you the highest date among all the child records.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.