You need to sign in to do that
Don't have an account?
j_panchal
Dummy column select in SOQL
Hello,
i have to questions :
1. Is there a way to select dummy column in SOQL like in SQL queries, like
[select Name, Phone , 'testDummyColumn' from Contact]
2. Is there a gender field in Contact sObject in SalesForce, and if not, from where we can select the gender of a contact. i have
to display a list of contacts on VF page along with their gender.
Thanks in Advance.
j_panchal, That Dummy column feature is not available in salesforce SOQL.
Also there is no such standard field in Contact Object for holding Gender. How ever you can create custom field to store and display Gender in visualforce page.
Hi Rahul,
Thanks for the response.
i'll use a custom field for gender.
just one more question - can we get column or field names that are used in a soql query, for example :
the soql query which i'm using is -
List<Account> lst = [select a.Name,a.Website, (SELECT c.FirstName, c.LastName,c.Title,c.Email, c.Phone, c.MailingState FROM a.Contacts c) FROM Account a].
then i need to get the labels of the fields which are used in the query, like in this case ('Name', 'Website' , 'FirstName', 'LastName', 'Title') and so on.
is there a way by which we can do this, tried using FieldSet in a Map but not getting the desired result.
Thanks.