You need to sign in to do that
Don't have an account?
kfran
How do I get a custom field to automatically pre-populate?
Hello,
I've created a custome "email field" in Opportunities> How do I get the email faddress rom the Contact page to pre-populate in my custom email field in Opportunities? Do I use the S-Control for that?
My ultimate goal is to create an Opportunity View which includes email addresses. When I go to create an Opportunity view, email is not an available field to display.
Please help!
Thanks.
Trigger to copy field
You could write an APEX Trigger that fires when the Opportunity is created, which copies Email from the Contact. However, if the Contact's email address changes in future, this will not be copied down to the Opportunity. (Unless you write another Trigger.)
S-Control to display, but not store, value
You could put an in-line S-Control on the Opportunity page that displays {!Contact.Email}. This will not be editable, and will always show the correct Email value on the Contact.
Something else
You could modify the "New Opportunity" functionality to pre-populate a field with a value from the Contact, but it's a bit more messy than the above. Oh, and with the Summer '08 edition about to come out, you could reference the field directly via a formula (it seems).
Thanks for your response, but what do you mean by an "in-line" S-Control?
Would I still need the actual S-Control 'Code' which will allow me to copy emails from contacts and transfer populate in the Opportunity page?
Thanks so much. This is all very new to me.
Do you have any particular need to store the email on the Opportunity record itself? (eg to show it in lists or in a Console column)
So, the first question is... what Contact's email address do you wish to show?
If you have added a custom Lookup(Contact) field on Opportunity, then the code would be something like:
Put the S-Control on your Opportunity Page Layout, turn on "show label", make the height about 20 and it should appear!
It would be much easier to show the Account's Email address. You'd just have to put in {!Account.PersonEmail}
Message Edited by jrotenstein on 05-23-2008 03:52 PM
Hello,
I wish to show all my contact emails on Opportunities. Is this possible? I have not added a Custom lookup field in Opportunity. Let me try this. Thanks so much.
<head>
<script src="/soap/ajax/12.0/connection.js" type="text/javascript"></script>
</head>
<body bgcolor=#f3f3ec>
<script>
var Accounts = sforce.connection.query( "select Metro_Area from Account where Id = '{!RFP__c.Supplier_AccountId__c}' ");
records = Accounts.getArray("records");
document.write(records[0].Metro_Area);
</script></body>
</html>
Hi Cvent,
What do you mean by "update a few fields"? Do you want to change the value of fields within the Salesforce database, or do you just want to show the text on the screen?
The code you have listed would only show information on the screen -- there is nothing there to update any fields.
Also, you will probably hav to change {!RFP__c.Supplier_AccountId__c} to {!RFP__r.Supplier_AccountId__c} but I'm not sure how your schema is organised.
Basically i have added a custom object in SF and i have linked account under master relationship, now i would like to display certain fields from the account level under the custom object without manually rentering them.
Either i wait till cross object formulas are launced, or if i could display these fields in the new object via custom s control...
Since i saw your post i though it could work, though my display came as blank; I tried to use the code that you gave below it didnt work. I have no idea about about Java or coding of any sought though we have tried our hand on similar things before though difficulty level would be a .5 on a scale of 100. Any help would be appreciated...