• Bailey Carlson
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am trying to use the metadata webservice API in order to determine which columns are on List Views and Search Layouts for a custom or out of box object. However, the response I get from the web service has the column names in an unusual format like this,

<listViews>
	<fullName>crmc_grid__AllContacts</fullName>
	<columns>ACCOUNT.NAME</columns>
	<columns>CONTACT.FIRST_NAME</columns>
	<columns>CONTACT.LAST_NAME</columns>
	<columns>CONTACT.ADDRESS2_STATE</columns>
	<columns>CONTACT.ADDRESS2_COUNTRY</columns>
	<columns>CONTACT.REPORTS_TO.NAME</columns>
	<columns>CONTACT.ADDRESS1_CITY</columns>
	<columns>CONTACT.EMAIL</columns>
	<columns>crmc_grid__Level__c</columns>
	<filterScope>Everything</filterScope>
	<label>All Contacts</label>
</listViews>
My question is how can I then use these a-typical column names to reliably and generically detect which SOQL fields are being displayed? In most cases it seems like removing the hyphens would translate to the SOQL schema name, however there is no Address1 or Address2 fields on the Contact table and they correspond to the Mailing and the Other address instead. Is there some other API for mapping these field names to field metadata or schema names? If this can't be done then what usefulness is there to the ListView metadata?

Thanks,
Bailey

I am trying to use the metadata webservice API in order to determine which columns are on List Views and Search Layouts for a custom or out of box object. However, the response I get from the web service has the column names in an unusual format like this,

<listViews>
	<fullName>crmc_grid__AllContacts</fullName>
	<columns>ACCOUNT.NAME</columns>
	<columns>CONTACT.FIRST_NAME</columns>
	<columns>CONTACT.LAST_NAME</columns>
	<columns>CONTACT.ADDRESS2_STATE</columns>
	<columns>CONTACT.ADDRESS2_COUNTRY</columns>
	<columns>CONTACT.REPORTS_TO.NAME</columns>
	<columns>CONTACT.ADDRESS1_CITY</columns>
	<columns>CONTACT.EMAIL</columns>
	<columns>crmc_grid__Level__c</columns>
	<filterScope>Everything</filterScope>
	<label>All Contacts</label>
</listViews>
My question is how can I then use these a-typical column names to reliably and generically detect which SOQL fields are being displayed? In most cases it seems like removing the hyphens would translate to the SOQL schema name, however there is no Address1 or Address2 fields on the Contact table and they correspond to the Mailing and the Other address instead. Is there some other API for mapping these field names to field metadata or schema names? If this can't be done then what usefulness is there to the ListView metadata?

Thanks,
Bailey

I am trying to use the metadata webservice API in order to determine which columns are on List Views and Search Layouts for a custom or out of box object. However, the response I get from the web service has the column names in an unusual format like this,

<listViews>
	<fullName>crmc_grid__AllContacts</fullName>
	<columns>ACCOUNT.NAME</columns>
	<columns>CONTACT.FIRST_NAME</columns>
	<columns>CONTACT.LAST_NAME</columns>
	<columns>CONTACT.ADDRESS2_STATE</columns>
	<columns>CONTACT.ADDRESS2_COUNTRY</columns>
	<columns>CONTACT.REPORTS_TO.NAME</columns>
	<columns>CONTACT.ADDRESS1_CITY</columns>
	<columns>CONTACT.EMAIL</columns>
	<columns>crmc_grid__Level__c</columns>
	<filterScope>Everything</filterScope>
	<label>All Contacts</label>
</listViews>
My question is how can I then use these a-typical column names to reliably and generically detect which SOQL fields are being displayed? In most cases it seems like removing the hyphens would translate to the SOQL schema name, however there is no Address1 or Address2 fields on the Contact table and they correspond to the Mailing and the Other address instead. Is there some other API for mapping these field names to field metadata or schema names? If this can't be done then what usefulness is there to the ListView metadata?

Thanks,
Bailey