CustomObjectTranslation Metadata API retrieved XML mismatches with the Metadata WSDL
Last updated 2020-04-14 ·Reference W-2401905 ·Reported By 3 users
XML returned by Metadata API for LookupFilterTranslation does not validate against the WSDL because it does not always include the errorMessage & informationalMessage elements.
To produce the invalid XML:
Note, your organization MUST have a lookup custom field with filter criteria and more than one language enabled (such as Spanish).
1. Create a lookup pointing out to Account in Account.
2. Add filter criteria which is optional.
Filter Type:Optional. The user can remove the filter or enter values that don't match criteria.
Lookup Window Text This is an international message for my lookup filter
3. Go to the Translation Workbench under Setup
4. Click on Translate Select the Filter Criteria with language as Spanish
a.Select Language: Spanish
b.Setup Component: Lookup Filter
d.Aspect: Informational message
Now select Lookup Filter Informational Message Translation in Master Lookup Filter Informational Message and write : This is the SPANISH translation for my Informational Message.
Then Save it.
5. Copy package.xml from the attached zip file on the case to the retrieveUnpackaged
folder in ANT and Now retrieve package.xml in ANT
and change Account-es
After retrieving check for Error Message in the schema under <fields>
<informationalMessage> This is the SPANISH translation for my Informational message</informationalMessage>
<relationshipLabel><!-- Accounts --></relationshipLabel>
Here we can see there is no Error message in ANT
6. Now if we look at Metadata WSDL from Setup > Develop > API page, we will see
<xsd:element name="errorMessage" type="xsd:string"/>
<xsd:element name="informationalMessage" type="xsd:string"/>
And the element above doesn't have "minoccurs" and goes to default which is 1.
"minoccurs" means that the element always has to be there.But the here this element is not there.
1) Update the metadata API WSDL so that the errorMessage & informationalMessage elements of the LookupFilterTranslation complexType have minOccurs="0" and possibly nillable="true".
2) Update the XML returned from the metadata retrieval so that it validates against the WSDL by always including an errorMessage & informationalMessage element.
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.