Reputation: 1
I am facing an issue while running product2 SOQL long query in Mule salesforce Connector. I am able to run and got successful json message with certain fields like Id, Name, ProductCode, Description etc . But some other fields are not working like... Units__c, Stock_Item__c, Sub_Category__c etc. Non working fields are not available as well while I was selecting with "Query builder" in "DataSense Query Language". I guess those fields are customs made from my organization. But All kinds of queries are working perfectly on Salesforce developer console. I am looking for solution so that i can invoke all the fields with result from salesforce product object.
Tried Also :
Thanks in advance !
Mule Configuration XML
<flow name="salesforce_invoking_all_product2_information_flow">
<logger level="INFO" doc:name="Get product2 -Start" message="Get product2- Start"/>
<dw:transform-message doc:name="Transform Message">
<dw:input-payload doc:sample="sample_data\json.json"/>
<dw:input-inbound-property doc:sample="sample_data\Map_1.dwl" propertyName="http.query.params"/>
<dw:set-variable variableName="lastModifiedDateTime"><![CDATA[%dw 1.0
%output application/java
---
(((inboundProperties."http.query.params".lastModifiedDate as :string)
as :localdatetime {format: "yyyyMMddHHmmss"})
as :string {format: "yyyy-MM-dd'T'HH:mm:ss'.000Z'"})
]]></dw:set-variable>
</dw:transform-message>
<sfdc:query-all config-ref="Salesforce_Basic_Authentication" query="dsql:SELECT Id, Name, ProductCode, Description, IsActive, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, RecordTypeId, Family, ExternalDataSourceId, ExternalId, DisplayUrl, QuantityUnitOfMeasure, IsDeleted, LastViewedDate, LastReferencedDate, Account_Number__c, Color__c, Cost_PO__c, Inventoried_Item__c, Length__c, Paint_Stain_Misc_Job_and_Unit_Charges__c, Style_Code__c, SalesforceID__c, Units__c, Number_Service_Products__c, Master_Legacy_Product__c, Has_Service_Products__c, Products_Joined__c, Number_of_Units__c, Mull_Sequence__c, Mull_Number__c, Mull_Material__c, Mull_Assembly_Type__c, isStandard__c, Unit_of_Measure__c, Stock_Item__c, Sub_Category__c, Cross_Reference__c, Width__c, Category__c, Pivotal_Id__c, Height__c, Unit_Short_Description__c, UI_Minimum__c, UI_Maximum__c, Service_PO__c, Report_Grouping__c, Master_Product__c, Name_Part_Number__c, Part_Number__c, Product_Configuration__c, Product_Image__c, Vendor__c, Product_PO__c, Product_Type__c FROM Product2 limit 10" doc:name="get product 2 details"/>
<json:object-to-json-transformer doc:name="Object to JSON"/>
<logger message="Get Contact- Finish" level="INFO" doc:name="Get Product 2 Finish"/>
</flow>
ERROR Console
Message : org.mule.modules.salesforce.exception.SalesforceException (org.codehaus.jackson.map.JsonMappingException)
Payload : org.mule.streaming.ConsumerIterator@6b1280fb
Transformer : ObjectToJson{this=599abd04, name='ObjectToString', ignoreBadInput=false, returnClass=SimpleDataType{type=java.lang.String, mimeType='application/json', encoding='null'}, sourceTypes=[]}
Payload Type : org.mule.streaming.ConsumerIterator
Element : /salesforce_invoking_all_product2_information_flow/processors/3 @ rba-salesforce-product-system:implementation.xml:26 (Object to JSON)
Element XML : <json:object-to-json-transformer doc:name="Object to JSON"></json:object-to-json-transformer>
--------------------------------------------------------------------------------
Root Exception stack trace:
[InvalidFieldFault [ApiQueryFault [ApiFault exceptionCode='INVALID_FIELD'
exceptionMessage='
Style_Code__c,SalesforceID__c,Units__c,Number_Service_Products__c
^
ERROR at Row:1:Column:390
No such column 'Units__c' on entity 'Product2'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.'
extendedErrorDetails='{[0]}'
]
row='1'
column='390'
]
]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:673)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:236)
at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:210)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:156)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
at com.sforce.soap.partner.PartnerConnection.queryAll(PartnerConnection.java:836)
at org.mule.modules.salesforce.SalesforceConnector$2.doQuery(SalesforceConnector.java:877)
Upvotes: 0
Views: 992