How to map custom object fetched from Query All activity to the next activity
book
Article ID: KB0083553
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Salesforce.com
6.2
Description
When fetching custom objects from Salesforce, we are unable to see them in the output of Query All activity irrespective of building a Query string to give that object as output. For example, if we have a factset_c element in Salesforce, which is being fetched using a Query all activity and want to map this element to Assign activity, the activity runs successfully but we can not see the factset_c value under output of this activity. This element can not be mapped to the next Assign activity.
Issue/Introduction
How to map a custom object fetched from Query All activity to the next activity for TIBCO ActiveMatrix BusinessWorks plugin for Salesforce.com 6.2.
Environment
N/A
Resolution
The solution is to coerce the output of Query All activity. Coerce the records elements from the Query all activity output to the required contact object and you will be able to map the "factset_c" or any other custom object. Coerce the records* element which is derived from the base sobject to the Salesforce Object that is being queried. This requires having the SalesforceMetadata schema available. Also, set the type to repeating. Do not cast the "any element" array at the end. This will look okay but not actually map anything. Also, attempting to cast the "result" object will give you a casting error.
Steps to map the custom elements fetched using Query All activity in Salesforce.com plugin.
1). Configure Query All activity by building a query string to fetch the fields required from Salesforce.com and from the required object.
2). As we are fetching a custom element, for example, factset_id in the attached project (Filename: CustomElementsMap.zip), we will not be able to see this object in output field of Query All activity, making it unable to map to further activities.
3). To be able to map the elements, we have to coerce the records element for Salesforce objects. For this, go to further activity (Assign activity), Go to input-> data source-> SalesforceQueryAll ->Result->records.
Right click on records and select "Add/edit Coercion". Add one coercion, select schema as Salesforce_Metadata.xsd and required the object, for example contacts in the attached project (Filename: CustomElementsMap.zip) .
4). You will be able to see all the elements under the object including the custom elements.
5). Now you will be able to map these custom elements.
See the sample project in the attachment. This project is the customer's environment and all the WSDL and schemas are already imported.
Attachments
How to map custom object fetched from Query All activity to the next activity
get_app