• yusuke nakayama
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
Hello Salesforce experts and users.

I would like to get fields' metadata (each field's label, qualified api name, description, and default value).

As far as I find out, I think there are two ways to do that.

1. Use SOQL (querying FieldDefinition)
https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_fielddefinition.htm
 
2. ​​​​​​​Use REST API (SObject describe())
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_describe.htm

I have tried to use these and have a problem for each methods.

The problem for SOQL is that i haven't figured out how to retrieve default value.  The SOQL queries I used are below
 
Select Label, QualifiedApiName, Description from FieldDefinition where EntityDefinition.QualifiedApiName = 'Account'; -- works fine

Select Label, QualifiedApiName, Description, defaultValue__c from FieldDefinition where EntityDefinition.QualifiedApiName = 'Account'; -- not works

And the problem for REST API is that it seems it doesn't return description in its response.
I used Python library called simple-salesforce for making an describe() API call.
https://github.com/simple-salesforce/simple-salesforce


Using both ways and combined these response would be one of the solution, but I feel it is redundant and want to avoid using it.
That is why I ask for help in this forum.

Any advice, or tips is much appreciated.

Thank you
I would like to extract Lead and Campaign data from salesforce via SOAP API and utilize it for our lead and campaign analysis.

I am planning to retrieve each data and load into our DB seperately and conduct 'join' the both data within our DB.
At that point, I am wondering if I can link the Lead and Campaign...So I would love to know whether there is a field that enable me to link those data.

As far as I saw the Salesforce lead window, it can include campaign history, so I thought that using CampaignHistory would be the solution.
But It seems like there are no key fields to link Lead and Campaign in either objects after reading these references.
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_campaignhistory.htm
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_lead.htm

Does anyone know how to do that?
Any information would be helpful for me only if I can link those data.

Thank you.

Yusuke
Hello Salesforce experts and users.

I would like to get fields' metadata (each field's label, qualified api name, description, and default value).

As far as I find out, I think there are two ways to do that.

1. Use SOQL (querying FieldDefinition)
https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_fielddefinition.htm
 
2. ​​​​​​​Use REST API (SObject describe())
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_describe.htm

I have tried to use these and have a problem for each methods.

The problem for SOQL is that i haven't figured out how to retrieve default value.  The SOQL queries I used are below
 
Select Label, QualifiedApiName, Description from FieldDefinition where EntityDefinition.QualifiedApiName = 'Account'; -- works fine

Select Label, QualifiedApiName, Description, defaultValue__c from FieldDefinition where EntityDefinition.QualifiedApiName = 'Account'; -- not works

And the problem for REST API is that it seems it doesn't return description in its response.
I used Python library called simple-salesforce for making an describe() API call.
https://github.com/simple-salesforce/simple-salesforce


Using both ways and combined these response would be one of the solution, but I feel it is redundant and want to avoid using it.
That is why I ask for help in this forum.

Any advice, or tips is much appreciated.

Thank you
I would like to extract Lead and Campaign data from salesforce via SOAP API and utilize it for our lead and campaign analysis.

I am planning to retrieve each data and load into our DB seperately and conduct 'join' the both data within our DB.
At that point, I am wondering if I can link the Lead and Campaign...So I would love to know whether there is a field that enable me to link those data.

As far as I saw the Salesforce lead window, it can include campaign history, so I thought that using CampaignHistory would be the solution.
But It seems like there are no key fields to link Lead and Campaign in either objects after reading these references.
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_campaignhistory.htm
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_lead.htm

Does anyone know how to do that?
Any information would be helpful for me only if I can link those data.

Thank you.

Yusuke