10-11-2012 08:24 AM
Is it easy to get the Company name from an Opportunity, along with other fields?
Do I need specific field names, or are there .NET properties on the Opportunity object?
10-12-2012 06:41 AM
There isn't a public property for companies associated with an opportunity, but there is a GetCompanies method that will return a CompanyList. There are properties for certain fields (such as the user fields), but not for all. Getting those fields and thier value is similar to how you would for any other top level entity. The psuedo code would look like this:
Opportunity myOpp = ActApp.ApplicationState.CurrentOpportunity;
MutableEntityFieldDescriptor mefd = ActApp.ActFramework.Opportunities.GetMutableEntityFieldDescrptor(StandardOpportunityField.User1);
string fieldValue = mefd.GetValue(myOpp);