Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

SDK Error Updating Currency on Account

(0) ShareShare
ReportReport
Posted on by 1,540

I have a plugin that is running on the update of Account - Currency field.

For me as a System Admin this runs fine. For a user who isn't they get the error "The given key was not present in the dictionary". The image definitely has the attibute in it.

Entity pre = context.PreEntityImages["pre"];
if (!pre.Contains("transactioncurrencyid")) //errors
    return;

The user has Organisation wide permissions on the account for all privileges except delete, and Organisation wide on Read, Append, Append To on Currency.
Are there any extra permissions I'm not aware of?

Categories:
  • ChrisJC Profile Picture
    ChrisJC 1,540 on at
    RE: SDK Error Updating Currency on Account

    Hi, thanks for the response.

    On the erroring account, the record does have a currency on it. The line is designed to catch accounts that don't already have a currency and exit the plugin.

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,052 on at
    RE: SDK Error Updating Currency on Account

    Hi

    I do not think the error message is related to permission. If the pre-image has the attribute ticked, I would first check if the currency field has value. If the currency field does not have value, it won't be passed to the image. You could check this on Account form or in an advance find query.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans