This project has moved. For the latest updates, please go here.
1

Closed

"An item with the same key has already been added" error when the same attribute appears more than once in the template

description

If the same attribute appears more than once in the template, "An item with the same key has already been added" error is thrown at the line of code in ProcessText method where dictionaryEntry is added into dictionary.

Checking .ContainsKey solved the issue.
if (!dictionary.ContainsKey(dictionaryEntry.Key))
Closed Sep 19 at 1:25 PM by rtebar
Thanks Mad_Computerist for the feedback. I have tried to reproduce it using the contact.fullname and it works fine. I was able to use this field twice in the same email template. Please let me know if you still had this problem. Remember we have moved now to Github: https://github.com/rtebar/dynamics-custom-emails

comments