Salesforce Input Connector - Selecting Deleted Records
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
- Mark as New
- Subscribe to RSS Feed
- Permalink
I was wondering if it was possible to select deleted records using the Salesforce Input Connector? Thanks in advance for any help that you can provide.
Solved! Go to Solution.
- Labels:
- Input
- Salesforce
- Mark as New
- Subscribe to RSS Feed
- Permalink
You should be able to by adding the following to the "Where Clause (SOQL)" input parameter:
isDeleted = TRUE
- Mark as New
- Subscribe to RSS Feed
- Permalink
Thanks for the feedback. I have tried this for the Account object in Salesforce but it does not return any records (this is the only filter I am using in the Salesforce Input tool).
I log into SF (using the same credentials that I have used in Alteryx) and I can see Accounts that have been deleted in the recyling bin.
I have read that you have to execute your SOQL query in APEX to select deleted records (and use the keywords "ALL ROWS") and I assume that Alteryx would have this limitation as well?
Thanks in advance for any insight you can offer.
- Mark as New
- Subscribe to RSS Feed
- Permalink
- Mark as New
- Subscribe to RSS Feed
- Permalink
I have done some more reading and research and found that if I modify the link in the file: "Alteryx\bin\RuntimeData\Macros\Supporting_Macros\SalesforceInput" from "/services/data/v20.0/query/?q=" to "/services/data/v29.0/queryAll/?q=" then I can pick up the deleted records - using "IsDeleted = TRUE". Do you know what the implications are of making this change are? Thanks
- Mark as New
- Subscribe to RSS Feed
- Permalink
I was reading from here:
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_queryall.htm
I assume the only implication is that I would have to be careful with deleted records (filter them in or out depending on what I wanted).
Is it possible to make another SalesforceInput (called SalesforceInput-QueryAll) and add it as a tool in Alteryx? I have created the macro but none of the nice UI features are showing (that the SalesforceInput tool has). Thanks!
- Mark as New
- Subscribe to RSS Feed
- Permalink
I can't speak to the implications but I can help you make a new tool using the modified macro that you created (nice job with that, by the way).
- Navigate to the HtmlPlugins folder within your Alteryx installation (eg C:\Program Files\Alteryx\bin\HtmlPlugins) and make a copy of the "Salesforce Input" folder, then rename the copy what you'd like the new tool to be called (eg "Salesforce Input - Query All")
- Within the new folder that you just created, rename "Salesforce InputConfig.xml" to "[New folder name]Config.xml" (eg "Salesforce Input - Query AllConfig.xml").
- Open the aforementioned xml file in a text editor. Change the reference to the underlying macro to point to the new custom macro you created (eg "Supporting_Macros/SalesforceInput.yxmc" -> "Supporting_Macros/SalesforceInput-QueryAll.yxmc"
At this point, if you restart Alteryx, you should have a working version of your new tool in the "Laboratory" tool category.
- Mark as New
- Subscribe to RSS Feed
- Permalink
Thanks Neil. I have done all the updates and things are working nicely. I will use this connector for selecting IsDeleted = TRUE records.
Digging through all of the backend Alteryx stuff has opened my eyes to the possibilities of other performance improvements I can make to my jobs. Thanks for all your help and prompt answers. I'm sure I will be back with more questions :-).
- Mark as New
- Subscribe to RSS Feed
- Permalink
Digging this post back up from a year ago. Not sure if the Saleforce Input Tool has been updated but I can't seem to find where the update to the macro needs to be made in order to get the deleted and even archived records.
Any help is greatly appreciated!
Thanks.
- Mark as New
- Subscribe to RSS Feed
- Permalink
No the Salesforce Input tool has not been updated to include IsDeleted records. Could you please be a bit more specific with your comments "I can't seem to find where the update to the macro needs to be made in order to get the deleted and even archived records"?
To make it work I had to go to: C:\Program Files\Alteryx\bin\RuntimeData\Macros\Supporting_Macros\SalesforceInput.yxmc and then change the references to the old REST API from "/services/data/v20.0/query/?q=" to "/services/data/v29.0/queryAll/?q=" in the "url" (first formula tool) in the section "get all fields to maintain saleforce order". But if you save this it will affect all your jobs that use the Salesforce Input tool and anyone else who uses the tool and that it why I was trying to make a copy and rename it.
Let me know if you have any further questions.