Salesforce_metadata.xsd file has element name appearing twice with different type in model group

Salesforce_metadata.xsd file has element name appearing twice with different type in model group

book

Article ID: KB0073530

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Salesforce.com 6.8.0

Description

If the metadata is updated at the Salesforce side and user gets the metadata or refresh the metadata, sometimes it is observed that the  model group has element name twice with different type in Salesforce-metadata-xsd which in turn throws xml validation errors in studio. This issue occurs while updating older projects due to changes in schema on Salesforce Side.
 

For Example:Under complex element "Asset"
==============
<element name="SBQQ__VirtualAsset__r" type="ens:Asset" nillable="true" minOccurs="0"/>
<element name="SBQQ__VirtualAsset__r" type="pns:TIBQueryResultTIB" nillable="true" minOccurs="0"/>
==============
It happens due to circular references between Salesforce sobjects. Example of a circular reference is a Contact object having a lookup relationship with an Account object and the Account object having a lookup relationship with the Contact object.

 

Environment

Salesforce plugin 6.8.0,BW 6.x OS=All

Resolution

To fetch the updated metadata in TIBCO Business Studio,Please set the property
"-Dcom.tibco.plugin.salesforce.use.newschema=true" in TIBCO_HOME\studio\4.0\eclipse
\TIBCOBusinessStudio.ini file and restart the studio and refresh the metadata.

For deployment, set the property com.tibco.plugin.salesforce.use.newschema=true in TIBCO_HOME\bw\version_number\domains\defaultdomain\appnodes\defaultappspace \defaultappnode\config.ini

By default the property is false and fetches the original schema. When set to true, it generates the updated Salesforce_Metadata.xsd required to support circular references.

This property was introduced in plugin v6.5.1 and is valid till the Salesforce plugin 6.8.0 and it will be depreciated from plugin v6.9.0.

Issue/Introduction

When the user gets the metadata or refresh the metadata, sometimes it is observed that the model group has element name twice with different type in Salesforce-metadata-xsd which in turn throws xml validation errors in studio.