You need to sign in to do that
Don't have an account?
EileenSFDCnewb
"Newbie" assistance request
Greetings all,
I'm fairly new to SFDC customizations, so I'm wondering if someone might be able to help me !
I have two custom objects.. let's call them TableParent and TableChild.
TableParent has the following fields: Primary1, Field2 and Field3.
TableChild has a a field called MyParent, which is simply a lookup against TableParent (and produces a selection list of the parent table's primary field, Primary1).
TableChild also has fields ParentField2 and ParentField3. I would like these to auto-populate based on the selection of MyParent.
How to proceed?
Thanks to any and all assistance,
Eileen M,
newb extrodinaire
The important thing that you have to do is educate your users into creating children using the control and not through pressing the 'New' button on the child tab.
The code behind the S-control looks something like:
<script language='JavaScript'>
function redirect() {
parent.frames.location.replace("/800/e?CF00N40000001U29x={!Parent_Field1}&CF00N40000001UAbc={!Parent_Field2}")
}
redirect();
</script>
The /800 is the id of your child edit page. You should be able to see this in the address bar at the top of your browser when you are inputing details of a new child.
The CF00N40000001U... are the names of the form fields you wish populating in the child edit page. If you use firefox then you can see these by using 'Tools' -> 'Page Info'
You can only use this when starting from the Parent record you want to create a new Child.
I only have professional edition here. If you have Enterprise then maybe you can have an S-Control on the Child that uses API calls to retrieve the information you would like from the Parent, but you'll need someone with Enterprise experience to help you there.
I have been playing with this reverse populate from a child object to a parent object and have come up with a dirty process that you might be able to use. This process will hopefully become obsolete when the new version of SF becomes available with Apex.
First thing you will need is a field on the parent that will hold the child ID and a field on the child that will hold the parent ID. You have to create the child object through the use of a sControl or custom link. You will use this link to populate the new field “Parent ID” on the child. You can then use this ID in a custom link to target the parent object and update the parent with the child information.
If you use this reverse link you can populate the parent with the child ID and then use those two ID fields to maintain data in both objects. If you used an sControl you could probably have the child and parent update with the correct information at once but a custom link will require two links to be activated, one on the parent and then on the child. At this time I’m only proficient with custom links so this is the process I have chosen.
This process will only work from the parent with the newest update from a child. If you create a new child and update the parent’s Child ID field then it will only allow information passed on to the newest child. Like I said, this is a dirty process and will require your users to perform extra steps and then there is always the chance that the data will not be maintained by them.
Please let me know if this does or doesn’t make sense, Chris
http://ideas.salesforce.com/article/show/22246
Cheers,
Eric