You need to sign in to do that
Don't have an account?
Reid Maulsby
Prepopulation help - copy information from custom object to new child custom object
Hello
I've read various postings on this subject, but this just isn't working for me. I'm replace the New button on a custom object (being created from another custom object). It's is automatically linking the two custom objects, but I'm trying to pull the Account link to the child custom object.
When I run the code, the URL is showing the correct IDs that I'm trying to populate, but the variables are not passing any information, and the page goes into an infinate refresh loop.
Here is the code that I'm running:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<script language="JavaScript">
function redirect ()
{
parent.frames.location.replace('/a0P/e?retURL%2F{!SFDC_Acct_Plan__c.Id}&CF00NT0000000rFro_lkid={!SFDC_Acct_Plan__c.Id}');
}
{
parent.frames.location.replace('/a0P/e?retURL%2F{!SFDC_Acct_Plan__c.Id}&CF00NT0000000rFro_lkid={!SFDC_Acct_Plan__c.Id}');
}
redirect();
</script>
</script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is setup as an HTML s-control.
Any and all help/insight is greatly appreciated.
Thanks
Reid
Code: Hope this helps. Also, in the future, please use the SRC button included in the editor when pasting code; I had to reduce the page's font size to find the reply button, which happens if there's too long of a line of text anywhere in the post. Thanks!
~ sfdcfox ~
Message Edited by sfdcfox on 08-14-2007 08:59 AM
Thanks sfdcfox.
So you're thinking that the merge fields should be able to work to pull a field from a parent into the child object by using that code to replace the New button? The post I linked above is saying that it isn't possible.
To check the merge field value, I used Alert() to show the value in a pop-up, and it was showing blank for the merge fields with the Account ID and Account Name. Any idea what I could have been doing wrong?
Here is the final code that I ended up using. (I know this is a bit of a mess, but at least it's working for me now! Any help on how this could be done better would be appreciated.)
Thanks again.
Code:
I guess this thread is right place to put my question.. I have developed similar kind of link for my use.
But now requirement is to populate picklist value. I am copying a record by clicking button.
0xxx000xxx0xxxx={!Account.Status__c} // Status is picklist -This is not working.
All the picklist fields values are not populated in new record. Any help around this highly appreciated