Hi Bhathiya,
[1] is the method to query in salesforce Connector According [2] So if you
code as same then what is your actual expecting result? and what your
getting now? is there any errors?
[1]
<salesforce.query>
<batchSize>200</batchSize>
<queryString>select id,name from Account</queryString>
</salesforce.query>
<!-- Execute the following to get the other batches -->
<iterate xmlns:sfdc="http://wso2.org/salesforce/adaptor"
<http://wso2.org/salesforce/adaptor> continueParent="true" expression=
"//sfdc:iterator">
<target>
<sequence>
<salesforce.queryMore>
<batchSize>200</batchSize>
</salesforce.queryMore>
</sequence>
</target>
</iterate>
[2] https://docs.wso2.com/display/CONNECTORS/Salesforce+Connector
On Fri, Aug 21, 2015 at 10:42 AM, Bhathiya Jayasekara <[email protected]>
wrote:
> HI Shakila,
>
> On Fri, Aug 21, 2015 at 12:58 AM, Shakila Sivagnanarajah <[email protected]
> > wrote:
>
>> Hi Bhathiya,
>>
>> Normally we use *fn:concat() *for this kind of situation. Are you
>> experiencing any problem while using this?
>>
>
> Nope. I was just looking if there is any better way. Thanks.
>
> @Kesavan: For some reason that didn't work for me. May be a scope
> mismatch.
>
> Thanks,
> Bhathiya
>
>
>>
>> On Fri, Aug 21, 2015 at 10:18 AM, Kesavan Yogarajah <[email protected]>
>> wrote:
>>
>>> Hi
>>>
>>> You can use the following configuration.You can get the query directly
>>> from the property mediator rather than the payload factory mediator.
>>>
>>> <property name="UserQuery" value="Select a.name, a.age From Users a
>>> where name='"/>
>>> <property name="Username" value="newuser"/>
>>> <property name="Apostrophe" value="'"/>
>>> <property name="CompleteUserQuery"
>>> expression="fn:concat(get-property('UserQuery'), get-property('Username'),
>>> get-property('Apostrophe'))"/>
>>>
>>>
>>> <salesforce.query>
>>> <batchSize>1</batchSize>
>>> <queryString xmlns:qu="user.com
>>> ">{get-property('CompleteUserQuery')}</queryString>
>>> </salesforce.query>
>>>
>>> Thanks
>>>
>>> Kesavan Yogarajah
>>> Associate Software Engineer
>>> Mobile :+94 (0) 779 758021
>>> [email protected]
>>> WSO2, Inc.
>>> lean . enterprise . middleware
>>>
>>> On Fri, Aug 21, 2015 at 9:50 AM, Sriashalya Srivathsan <[email protected]
>>> > wrote:
>>>
>>>> Hi
>>>> You can try this by following
>>>>
>>>> <property expression=“//qu:user/qu:query/text()" name="queryString"/>
>>>>
>>>> <salesforce.query>
>>>> <batchSize>1</batchSize>
>>>> <queryString>$ctx: queryString}</queryString>
>>>> </salesforce.query>
>>>>
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> On Fri, Aug 21, 2015 at 9:45 AM, Shakila Sivagnanarajah <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Bhathiya,
>>>>>
>>>>> From my knowledge, creating my query with a dynamic value using
>>>>> property is the best way rather setting the value for queryString
>>>>> directly. If we do like this, that value will be set to message
>>>>> context.
>>>>>
>>>>> Thank you
>>>>>
>>>>> On Fri, Aug 21, 2015 at 9:42 AM, Shakila Sivagnanarajah <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Bhathiya,
>>>>>>
>>>>>> From my knowledge, creating my query with a dynamic value is the
>>>>>> best way. If we do like this, that value will be set to message context.
>>>>>>
>>>>>> Thank you
>>>>>>
>>>>>>
>>>>>> On Fri, Aug 21, 2015 at 5:26 AM, Bhathiya Jayasekara <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I want to execute $subject. I could achieved it like below, but I
>>>>>>> believe there must be a better way.
>>>>>>>
>>>>>>> <property name="UserQuery" value="Select a.name, a.age From Users a
>>>>>>> where name='"/>
>>>>>>> <property name="Username" value="newuser"/>
>>>>>>> <property name="Apostrophe" value="'"/>
>>>>>>> <property name="CompleteUserQuery"
>>>>>>> expression="fn:concat(get-property('UserQuery'),
>>>>>>> get-property('Username'), get-property('Apostrophe'))"/>
>>>>>>>
>>>>>>>
>>>>>>> <payloadFactory media-type="xml">
>>>>>>> <format>
>>>>>>> <qu:user xmlns:qu="user.com">
>>>>>>> <qu:query>$1</qu:query>
>>>>>>> </qu:user>
>>>>>>> </format>
>>>>>>> <args>
>>>>>>> <arg evaluator="xml"
>>>>>>> expression="get-property('CompleteActivityQuery')"/>
>>>>>>> </args>
>>>>>>> </payloadFactory>
>>>>>>>
>>>>>>>
>>>>>>> <salesforce.query>
>>>>>>> <batchSize>1</batchSize>
>>>>>>> <queryString
>>>>>>> xmlns:qu="user.com">{//qu:user/qu:query/text()}</queryString>
>>>>>>> </salesforce.query>
>>>>>>>
>>>>>>>
>>>>>>> I'd like to know 2 things. what is the best way,
>>>>>>>
>>>>>>> 1) to create my query with a dynamic value (i.e. property)?
>>>>>>> 2) to set a property value to queryString?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> --
>>>>>>> *Bhathiya Jayasekara*
>>>>>>> *Senior Software Engineer,*
>>>>>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>>>>>
>>>>>>> *Phone: +94715478185 <%2B94715478185>*
>>>>>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>>>>>>> <http://www.linkedin.com/in/bhathiyaj>*
>>>>>>> *Twitter: https://twitter.com/bhathiyax
>>>>>>> <https://twitter.com/bhathiyax>*
>>>>>>> *Blog: http://movingaheadblog.blogspot.com
>>>>>>> <http://movingaheadblog.blogspot.com/>*
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Dev mailing list
>>>>>>> [email protected]
>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Shakila Sivagnanarajah
>>>>>> Associate Software Engineer
>>>>>> Mobile :+94 (0) 770 760240
>>>>>> [email protected]
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Shakila Sivagnanarajah
>>>>> Associate Software Engineer
>>>>> Mobile :+94 (0) 770 760240
>>>>> [email protected]
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards
>>>> S.Sriashalya,
>>>> WSO2 *Inc*.
>>>> lean . enterprise . middleware
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>
>>
>> --
>> Shakila Sivagnanarajah
>> Associate Software Engineer
>> Mobile :+94 (0) 770 760240
>> [email protected]
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Bhathiya Jayasekara*
> *Senior Software Engineer,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
Thank you
Best Regards
*Rajjaz HM*
Associate Software Engineer
WSO2 Inc. <http://wso2.com/>
lean | enterprise | middleware
Mobile : +94752833834
Email :[email protected]
LinkedIn | Blogger | WSO2 Profile
<http://wso2.com/about/team/mohammer_rajjaz/>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev