function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Philip Meldrum08237737677563425Philip Meldrum08237737677563425 

List View Metadata Field Names vs API Field Name

We are using the Metadata API to inspect List View objects, and have managed to find the Filter Fields, but they are using a different naming convention.

For example the API name for Fax in Accounts is 'Fax', but in the Metadata name in the filter fields is ACCOUNT.PHONE2

The same mixing up of names seems to happen with ALL standard object, though custom objects & fields simply use the API Name.

Does anyone have any idea how we can map the Metadata name ( ACCOUNT.PHONE2) to the API Name (Account.Fax)?
Philip Meldrum08237737677563425Philip Meldrum08237737677563425
Thanks @Matthews
We have successfully used the 'customobject' as detailed in this link to get the details for the ListView.
The problem is the value returned by the metadata api.

Here is a sample API from|StartTopic=Content%2Fmeta_listview.htm|SkinName=webhelp

        <booleanFilter>1 AND 2</booleanFilter>
            <value>Eric Bristow</value>
        <label>My Mileages</label>

This is fine:, the filter uses the custom field name City__c, which is the API name.
The problem comes when STANDARD fields are used, so for example the standard field 'Fax' has the following definition in the filters:

            <value>020 765 9787</value>

The instead of the api name 'Fax' you get 'PHONE2'
So our problem is how to map these specials ListViewFilterNames to API Names.

Maimoona S.Maimoona S.
Hi Philip ,

Have you ever get the solution of this problem ?
I have another problem using metadata Api . I am getting list views and list view filters using metadata api . 
This works as required in one org , but when I tried in another org I can get List views but not the list views filters.(This org have managed package so have a namespace prefix . does this any difference ? )

This is the xml I get in return 
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="" xmlns:xsd="" xmlns:xsi="">
    <SessionHeader xmlns="">
    <readMetadata xmlns="">


<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" xmlns="" xmlns:xsi="">
        <records xsi:nil="true"/>

I am stuck in this issue and really need someone's help. Please if you can suggest what the problem might be , I will be very thankfull to you.

Thanks in advance