You need to sign in to do that
Don't have an account?
dfpitt
Defaults when creating a new record
I have 3 custom objects: A, B and C.
B: Has a master-detail relationship with A
C: Has a master detail relationship with B and a lookup relationship with A
If I am viewing a record of a custom object type B and I create from there a NEW record of type C, it automatically fills in the field that relates C to B, but the field that relates C to A is empty. Given that B is connected to a specific A, i would like that A to be related by default to C.
How can I do this? Does this need to be a new custom button?
I created a custom button that:
- Calls a method in an APEX class that creates the records with the defaults
- Sends the browser to that record so that the user can modify the relevant fields
All Answers
Hi,
You will have to Pick the Value of A field on C object manualy and then all the fields related to A will be populated in C object.
It will not be auto populated as its one to one relationship.
Thanks.
Thanks,
is there no way to fill it out automatically?
hi,
You can try creating a formula Field, where you can traverse through the relationship from C->B-> A to pull the the field need from A object on to C objects.
Thats not a bad idea, but the fields that I want to have defaults on are lookup and master-detail relationship fields. Is there any way to default those?
I created a custom button that:
- Calls a method in an APEX class that creates the records with the defaults
- Sends the browser to that record so that the user can modify the relevant fields