Answered by:
Displaying Account Fields in the Opportunity Form

Question
-
I would like to display "number of employees" and other fields in the account form on an opportunity form. How do I add these account fields to the opportunity form? Some of the account fields show relevant information when creating a new opportunity record and I don't want to click on the account name to bring up the account record. I want to be able to add these fields from the account record to the opportunity record and have the information displayed as read-only.
Thank you,
Sheryl
Thursday, April 29, 2010 4:44 PM
Answers
-
Hi Sheryl,
As Leon said you can create mapping when you create the relationship between Account and Opportunity.Create a new mapping for the field you want to map , in the relationship.
If you want to make it read only you can use javascript and can check whether the Opportunity form is created from a Account record/parent form is an account. If yes you can disable the fields else you can enable the fields
Thanks, Aarch- Proposed as answer by Aarch Tuesday, May 4, 2010 6:00 AM
- Marked as answer by DavidJennawayMVP, Moderator Monday, July 12, 2010 1:13 PM
Tuesday, May 4, 2010 5:59 AM
All replies
-
You could use javascript AJAX call on the CRM web service and retrieve the information you require from the Account during the onload event of the opportunity. You could also build a SSRS report that displays the info you need and embed that in an IFRAME on the opportunity.
MSCRM Bing'd - http://bingsoft.wordpress.comThursday, April 29, 2010 9:49 PMModerator -
I have to do something similar with the Case form. Rhett is correct that you can load the information to custom attributes on the Opportunity form in the onLoad event. It takes a little effort to setup the queries, but its the easiest way to show related information. Let us know if you need some sample code.Friday, April 30, 2010 1:32 AM
-
If you create the opportunities from the context of the account then you could configure mapping to copy the information to corresponding Opportunity attributes.
Leon Tribe
Want to hear me talk about all things CRM? Check out my blog
http://leontribe.blogspot.com/
or hear me tweet @leontribe
Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe- Proposed as answer by Leon TribeMVP Monday, May 3, 2010 8:17 PM
Monday, May 3, 2010 8:17 PM -
Hi Sheryl,
As Leon said you can create mapping when you create the relationship between Account and Opportunity.Create a new mapping for the field you want to map , in the relationship.
If you want to make it read only you can use javascript and can check whether the Opportunity form is created from a Account record/parent form is an account. If yes you can disable the fields else you can enable the fields
Thanks, Aarch- Proposed as answer by Aarch Tuesday, May 4, 2010 6:00 AM
- Marked as answer by DavidJennawayMVP, Moderator Monday, July 12, 2010 1:13 PM
Tuesday, May 4, 2010 5:59 AM -
Hi Aarch,
I tried to create the relationship mapping and the field appeared in the opportunity form, but it was blank. It did not bring in the data from the account record. So, for example, if account had 20 employees, the number of employees field I created in the opportunity form was not auto-populated with 20 from the account record. It doesn't have to be read-only, I just wanted the data to be initially filled in.
Thanks, Sheryl
Tuesday, May 11, 2010 5:50 PM -
Go to the relationship in the entity Relationships list and open the relationship form. On the left hand nav pane you will see an option named Mappings. Go here and add your relationship mapping between the two fields.
MSCRM Bing'd - http://bingsoft.wordpress.comTuesday, May 11, 2010 9:17 PMModerator