web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

translation for InvalidPluginExecutionException message

(0) ShareShare
ReportReport
Posted on by 197

Hello,

Right now when I throw InvalidPluginExecutionException errors I supply it with messages, e.g.: Deactivation is not allowed , so error looks like this: throw new InvalidPluginExecutionException("Deactivation is not allowed");

This error is displayed on any language, in crm.

Is there a possibility to translate this message, without plugin ?

I mean, can I treat this message as a key which will be added in the translations excel file and which will have different language options ?

Or is passing the correct language string the only solution ?

Thanks

I have the same question (0)
  • Suggested answer
    - Matt Bayes - Profile Picture
    890 on at
    RE: translation for InvalidPluginExecutionException message

    Hey Khachapuri,

    The only solution that I have implemented is to store a resource file in the Plugin project and include the translations for each language inside of that file.

    In your plugin code, you can then retrieve the associated translation with the proper language parameter and use that output in your error message.

    You can find the example of this in the Microsoft documentation here:

    docs.microsoft.com/.../hh670609(v=crm.8)

    Hopefully this helps!

    Thanks!

    Matt Bayes

  • magical Khachapuri Profile Picture
    197 on at
    RE: translation for InvalidPluginExecutionException message

    Thanks, I'm aware of this solution, it would be nice if there were some other options as well

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: translation for InvalidPluginExecutionException message

    There is no other way. You will have to implement localization in the code of your plugin.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 228

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 156 Super User 2025 Season 2

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 149

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans