Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to get source of calling in retrieve plugin

Posted on by 362

Hi Guys,

I have a plugin on Retrieve Multiple, I have to restrict this plugin execution from CRM UI only. If I am retrieving using SDK messages this plugin should not execute. Is there a way to restrict this? It's really urgent for me.

Thanks,

Phani.

*This post is locked for comments

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: How to get source of calling in retrieve plugin

    There could be workarounds, though.

    - Check the user instead (in case you are only concerned about those SDK messages which are issued by your other plugins and those plugins are running under a special user)

    - Add a dummy field to your entity and always include it in your SDK queries - regular users won't include it through the UI, so you will know (for example in the "pre-retrievemultiple", if you look at the query) that it's not a UI call

  • Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: How to get source of calling in retrieve plugin

    (...)

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: How to get source of calling in retrieve plugin

    Hello,

    Is is CRM Online or On-Prem?

    If you're On-Prem that you're good to use Non-Isolated plugin and approach provided here - a33ik.blogspot.com/.../callerorigin-in-plugins.html

    If you're online I'm afraid you have no options to get the source.

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