Henrik Lapinkaira 2 Posted December 18, 2020 Share Posted December 18, 2020 I am having issues migratingdata into D365 Sales because of duplicate records. Ifa lookup blocks Result.RecordsMatched=2, how touse the first record that matched Like insted of using Retrive Multiple just Retrive, or select top 1. Link to comment Share on other sites More sharing options...
Nick Roelandt Posted January 12, 2021 Share Posted January 12, 2021 Hi Henrik, Could you please share your Flow design with us thanks Nick Link to comment Share on other sites More sharing options...
Ash Arendsz Posted February 4, 2021 Share Posted February 4, 2021 Hi Henrik, Aside from the initial query block, you can retrieve/querydatain two different ways: 1 - Using Lookup Block, to retrieve 1 result when Resultmatch =1 . (always only one record in the result, when match =0(meaning no match was found) or match=2(meaning 2 or more matches were found), Warning:When Resultmatch = 0 or Resultmatch=2 the Lookup Block resultfields are all set to Null Values, if you try to map the Null values you may get errors. 2 - Using a Fetch Block to retrieve match =X results, it will basically loop thru each result and execute any target block you add in the Fetch Loop. When Fetch has 0 results, all blocks inside the Fetch Loop are skipped. Note: in order to be selective on which matched records to map, you can add an IF Block in the Fetch Loop and add some criteria to de-duplicate your record or do other data validation before mapping the data to a target system or deciding in skipping a record. More info on using a Fetch block can be found here: https://support.tibco.com/s/article/update-or-delete-multiple-records-wi... 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