Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

An item with the same key has already been added

Posted on by Microsoft Employee

If y'all wish to look up the CreateRequest class you will find an attribute called "tag".

https://docs.microsoft.com/en-us/powerapps/developer/data-platform/org-service/use-messages#:~:text=tag,from the Organization Service

var account = new Entity("account");
account["name"] = "Contoso";

var request = new CreateRequest() { Target = account };
request["tag"] = "This is a value passed.";

var response = (CreateResponse)svc.Execute(request);

It works fine at depth 1 of a chain of plugins but, as soon as I try the same syntax at depth 2, I get the error message stated in the subject above.

Is it immutable?  How are we supposed to change the value of the SharedVariable?  Shouldn't this just reset the value or "tag"?

And don't even start with ParentContext.SharedVariables.  I don't know what MS has done to make sure that doesn't work (it does NOT contain or containkey!)

TIA

PS- I suddenly have another idea.  Change the "tag" SharedVariable instead of the request attribute -- I will report back.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans