03-15-2019 01:28 PM
Is there a way to pass a pipeline parameter to a child pipeline which has a SOQL, and use that parameter in the SOQL?
I am trying to output a date field from a parent pipeline and pass it into the SOQL which is a part of the child pipeline?
Appreciate your help. Thanks!
03-16-2019 01:17 PM
Here is sample of how to pass parameter to Salesforce SOQL snap. Unsure about your specific use case but likely you might not need to introduce a sub-pipeline.
Hope this help.
SFDC_User_Role_2019_03_16.slp (6.6 KB)
03-18-2019 05:58 AM
Thanks for your quick reply! How do i import/view the pipeline attached in your reply?
A bit more information on my usecase:
On a higher level, I am trying to compare a datetime within Salesforce Account object and a sql server database.
I am trying to compare the LastModifiedDate in Salesforce to the last time the pipeline ran in order to get the updated records within the last time-block.
Since I want visibility over my pipeline, I have a created a SQL Server database and I write a timestamp in it every time my parent pipeline runs. I want to pass that timestamp from my parent pipeline to my child pipeline. The child pipeline has a SOQL snap using which I am trying to compare both timestamps and get specific records.
03-18-2019 09:37 AM
To view his pipeline, you would need to download it from here and import it into your environment, preferably in a test area.
03-18-2019 09:55 AM
Got the import option. The query still seems to give me an error. The SOQL query I am using is below:
“SELECT Id ,IsDeleted ,MasterRecordId ,Name ,Type ,RecordTypeId ,ParentId ,BillingStreet ,BillingCity ,BillingState ,BillingPostalCode ,BillingCountry FROM Account WHERE LastModifiedDate >” +$StartTime
and I am passing the StartTime as a string in the required format.
eg. 2019-03-15T19:15:13.067
It gives me a 400 error.
Reason: {‘statusCode’=‘400’, ‘message’=‘The request could not be understood, usually because the JSON or XML body contains an error.’, ‘response’=‘[{“message”:“line 1:0 no viable alternative at character ‘"’”,“errorCode”:“MALFORMED_QUERY”}]’},