Skip to main content
Andy Rossmeissl 님이 #Data Management에 질문했습니다
I can retrieve Opportunity field metadata, including picklist values, with the REST API like so:

 

 

[{"active"=>true, "defaultValue"=>false, "label"=>"Prospecting", "validFor"=>nil, "value"=>"Prospecting"},

{"active"=>true, "defaultValue"=>false, "label"=>"Qualification", "validFor"=>nil, "value"=>"Qualification"},

{"active"=>true, "defaultValue"=>false, "label"=>"Needs Analysis", "validFor"=>nil, "value"=>"Needs Analysis"},

{"active"=>true, "defaultValue"=>false, "label"=>"Value Proposition", "validFor"=>nil, "value"=>"Value Proposition"},

{"active"=>true, "defaultValue"=>false, "label"=>"Id. Decision Makers", "validFor"=>nil, "value"=>"Id. Decision Makers"},

{"active"=>true, "defaultValue"=>false, "label"=>"Perception Analysis", "validFor"=>nil, "value"=>"Perception Analysis"},

{"active"=>true, "defaultValue"=>false, "label"=>"Proposal/Price Quote", "validFor"=>nil, "value"=>"Proposal/Price Quote"},

{"active"=>true, "defaultValue"=>false, "label"=>"Negotiation/Review", "validFor"=>nil, "value"=>"Negotiation/Review"},

{"active"=>true, "defaultValue"=>false, "label"=>"Closed Won", "validFor"=>nil, "value"=>"Closed Won"},

{"active"=>true, "defaultValue"=>false, "label"=>"Closed Lost", "validFor"=>nil, "value"=>"Closed Lost"}]

 

But I can't seem to find a way to retrieve the "Type" metadata associated with each picklist value that you can see with the web interface:

 

_img alt="Screenshot" src="https://www.dropbox.com/s/h1u6t16dr5vm1vh/Screenshot%202016-10-31%2017.30.02.png?dl=1" /_

 

Is there any way to get that "Type" metadata using the REST API?
답변 2개
  1. 2016년 10월 31일 오후 11:45
    Type information is saved in ForecastingType and ForecastingTypeToCategory system object, see below SOQL-

     

    select CanDisplayQuotas, CreatedById, CreatedDate, DeveloperName, Id, IsActive, IsAmount, IsDeleted, IsQuantity, Language, LastModifiedById, LastModifiedDate, MasterLabel, SystemModstamp from ForecastingType

     

    select CreatedById, CreatedDate, DisplayPosition, ForecastingItemCategory, ForecastingTypeId, Id, IsAdjustable, IsDeleted, IsOwnerAdjustable, LastModifiedById, LastModifiedDate, SystemModstamp from ForecastingTypeToCategory

     

    You can reference this information by doing API calls to the two objects-

     

    https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_forecastingtype.htm

     

     
0/9000