You need to sign in to do that
Don't have an account?
sravanthi bhavanam
Metadata API backward compatibility
I am using Metadata API version 37 while one of our sandboxes were upgraded to v40 (Spring '17). We ran into an issue while running the statement:
This returned KnowledgeSettings response:
The property enableCaseDataCategoryMapping is not available on v37 but Salesforce sends the response treating it as v40. Can this be avoided by having backward compatibility with the responses?
The issue is that this application is deployed on various environments and getting updates for every new version is quite difficult to maintain.
ReadResult readResult = mdConnection.readMetadata("KnowledgeSettings", new String[] { "*" });
This returned KnowledgeSettings response:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <readMetadataResponse> <result> <records xsi:type="KnowledgeSettings"> <fullName>*</fullName> <answers> <enableArticleCreation>false</enableArticleCreation> </answers> <cases> <defaultContributionArticleType>How_To</defaultContributionArticleType> <editor>standard</editor> <enableArticleCreation>true</enableArticleCreation> <enableArticlePublicSharingSites>false</enableArticlePublicSharingSites> <enableCaseDataCategoryMapping>true</enableCaseDataCategoryMapping> <useProfileForPDFCreation>false</useProfileForPDFCreation> </cases> --- </readMetadataResponse> </soapenv:Body> </soapenv:Envelope>
The property enableCaseDataCategoryMapping is not available on v37 but Salesforce sends the response treating it as v40. Can this be avoided by having backward compatibility with the responses?
The issue is that this application is deployed on various environments and getting updates for every new version is quite difficult to maintain.
From the request, it is hitting v37.0 but returning v40.0 response which is invalid.