function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ed enaed ena 

adding an s-control

I want to build an s-control where it takes my account info and copies specific custom fields and imports the info into the contact field of a new contact associated to that account.  Is there a simple way to do this?
Angel118Angel118
Hi Ena,
             For this you need to write an S-Control which would overirde the Contact View.
As u create the Contact for a Particular Account and save it, the Control will come into action and fetch the relevant fields from Account and Update the Contact.

Angel..

Message Edited by Angel118 on 10-04-2007 02:55 AM

michaelforcemichaelforce

ed ena,

There is a non-coding way to accomplish this...  you can create a custom link on your account page that brings the user to the 'new contact' screen and passes values for various fields through the URL.  For an example of passing values in this manner, click the "add me as a salesforce.com contact" link in my signature on this message.  To figure out the names of the fields that you wish to populate, just go to your contact add screen and "view source"... then find the html input components you are looking to populate and copy the Id.  Then you are ready to setup the custom link, using merge fields to fill in the data as oppose to being hardcoded as they are in my signature.

Two notes to keep in mind... 1. salesforce is releasing standard functionality to automatically include info from parent objects on page layouts (winter '08 maybe?)... 2. This is a bit of a hack, because if salesforce changes the html Id of any of the fields, then it will break.  But this is unlikely.

Hope this helps!