Charles Spring Posted October 20, 2023 Share Posted October 20, 2023 The Fetch seems similar to the Saleforce Flow command "Get Records", except in SF, you can sort those records. I don't see a way to sort in Scribe.If I can sort the records as part of the Fetch, I process all the records that need to relate to the same Account with fewer lookup query actions to SF. In a large batch of items (sometimes hundreds), I might only have 2-3 different Accounts represented. I will only need to create a few JEs and then associate all items to the appropriate JE. If the list of sorted by the Account field, those needing a certain JE will be all consecutive, I can then store in a local variable the previous record's Account and then see if it is the same as the current record. If the same then use the previous JE Id to link this item to. Only if it is different that the previous (or the very first one), will I need to create a new JE. So I would not need to do any lookups within the Fetch loop, keeping my API calls to SF a lot lower.Any tips or ideas on how to sort in order to avoid extra lookups/API calls?Since I am also having to do a different Lookup, a Create record for a different object than the JEs mentioned above, as well an Update on each item in the list that is Fetched, perhaps the Lookup needed for each item will be inconsequential?But still it would be nice to have a sort option! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now