You need to sign in to do that
Don't have an account?

S-Control to override New Button and populate Fields on custom Object
Hi!
I'm new to writing S-Controls so I really don't know where to begin. I need to override the new button on a custom object so two fields (Case Owner & Phone) pre-populate when the user hits "New". Basically, I want to keep the standard New Action but added in my own code. I don't want to have to user click more than once. This is all I could come with up and it does not work. Any help would be greatly appreciated!! Code:
<script language="JavaScript"> window.parent.location.href="{!URLFOR($Action.Banking_Svs_Research_Req__c.New, null,null,true)}"; function redirect() { parent.frames.location.replace("/{! Banking_Svs_Research_Req__c.Id }/e—retURL=%2F{!Banking_Svs_Research_Req__c.Id}&00NT0000000iTK0={!Case.OwnerFullName}&00NT0000000iTuS={!Case.SuppliedPhone}&save=x") } redirect(); </script>
Silly question, but did you make the toolkit available in your s-control?
i.e., <script src="/soap/ajax/9.0/connection.js" type="text/javascript"></script>
or.... what's the error message you are receiving?
Yes. I have playing around with it for awhile and I still keep getting a blank screen??? Here's the code I entered:
Code:
I just want the owner name and phone number to be piped in when they hit new.
Where "ZZZ" is the Id prefix for your custom object.