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
sunny.sfdcsunny.sfdc 

Get Competitor Names through Apex

Hi

Is there any way that I can fetch competitor names configured in opportunity object through Apex code?

Regards
Sachin
Satish_SFDCSatish_SFDC
How are the competitor names configured.
Is it a textarea field which contains a comma separated value.

Regards,
Satish Kumar
sunny.sfdcsunny.sfdc
Hi Satish

Competitor is a  standard picklist available in Opportunity object.

Regards
Sachin
Satish_SFDCSatish_SFDC
I now understand the issue. You are basically looking to get all the valid valid values of a standard picklist.
This is possible using the describe methods of sObject.

Check this link:
http://salesforce.stackexchange.com/questions/4992/how-to-get-a-picklist-all-values-in-apex-controller

Regards,
Satish Kumar
sunny.sfdcsunny.sfdc
Hi Satish

The problem is this Competitor field is not visible through API. So whenever I try to use describe it simply says no such field on Opportunity object.

Regards
Sachin