You need to sign in to do that
Don't have an account?
SalesForce SQL Query
Hi All,
I am trying to write a query that export all the data of leads (the data that we need to export is available under (App Setup -> Customize -> Leads -> Fields), i am able to export some fields, but when trying to access some fields i am getting an SQL Error:
(No such column 'Address' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.)
this is the list of the fields that we need to export using our php code:
- Address
- AnnualRevenue
- Campaign
- Company
- CreatedBy
- Jigsaw
- Industry
- LastModifiedBy
- LastTransferDate
- Owner
- RecordType
- NumberOfEmployees
- Rating
- Title
- Correlation_Data
- CorrelationID
- ProductInterest
- Financial_Product
- IB
- iContact_Contact_Id
- Lead_Number
- Lead_Source_Details
- Lead_Type
- Web_to_x_Lead
- Web_to_x_form_id
- Preferred_Communication
- Round_Robin_ID
- Trading_Softwae
- VIP_Customer
- Web_Source
I appreciate your help
See I can give you some samples like for campign try with these fields :
Campaign
- CreatedBy -> CreatedById or CreatedBy.Id
- LastModifiedBy -> LastModifiedById or LastModifiedBy.Id
I hope you got the sense what am trying to say?
All Answers
To access the complete address you've to use these :
City
Country
CountryCode
Latitude (beta)
Longitude (beta)
PostalCode
State
StateCode
Street
For complete list visit here :
https://www.salesforce.com/us/developer/docs/api/Content/compound_fields_address.htm
These are compound fields and not directly accessible in code.
I already tested these fields to access a complete the address and it worked for me, but the issue is not for the address field only.. as i need to reference many other fields:
Campaign
- Company
- CreatedBy
- Jigsaw
- Industry
- LastModifiedBy
- LastTransferDate
- Owner
- RecordType
- NumberOfEmployees
- Rating
- Title
- Correlation_Data
- CorrelationID
- ProductInterest
- Financial_Product
- IB
- iContact_Contact_Id
- Lead_Number
- Lead_Source_Details
- Lead_Type
- Web_to_x_Lead
- Web_to_x_form_id
- Preferred_Communication
- Round_Robin_ID
- Trading_Softwae
- VIP_Customer
- Web_Source
i know that those fields are not accesible via a query on the lead object, but sure there should be another way to export these data
See I can give you some samples like for campign try with these fields :
Campaign
- CreatedBy -> CreatedById or CreatedBy.Id
- LastModifiedBy -> LastModifiedById or LastModifiedBy.Id
I hope you got the sense what am trying to say?
it's clear now