Search This Blog

Friday, September 30, 2022

How To Deal With this Dynamics 365 Plugin Interview Question?

Whenever you face this situation, that the plugin only fails in the production region but not in the development or User Acceptance Test (UAT) environment, then the first and foremost thing you can do is to observe the behavior of the Plugin carefully in production aka. plugin black-box testing.

Now the obvious query comes to your mind is, that what the hell is Black-Box testing?

In nutshell, Black-box testing means we try to observer the behavior and symptoms of the system without having actual technical / coding information in hand.

Now, What Can we do about this Dynamics 365 Plugin situation?

So when you observe the plugin behavior carefully on production then, you can see either of below two outcomes.

  • Firstly, the plugin will not throw any error on screen but at the same time, it will not perform the required job for which it was written in the first place.
  • or Secondly, the plugin will immediately throw an error the moment the action is taken on which that plugin is registered.

1) So if the plugin is not throwing any error on screen but at the same time, it is not performing the required job, then the possible root cause for that might are mentioned below.

  • Firstly, it might happen that the Plugin itself is not triggering. Then Compare the Plugin Configuration on Production with the development / UAT environment. And make sure that plugin is triggering
    • Check the Message.
    • Filtering Attributes if any
    • Run in User’s Context
    • Stage
    • Synchronous / Asynchronous Execution Mode
    • Unsecure/Secure Configurations ( Secure Configurations has to be reconfigured manually. Check this article for details)
    • If applicable, verify the POST/PRE Images and attributes.
    • Lastly, debug the plugin and make sure that it is triggering in the first place.
  • Secondly, the Plugin might be triggering but going out of the code due to some null check conditions in code. Make to verify below items to solve this
    • Check the Plugin Code, for all null checks in your plugin. And try to see if it’s not moving out due to that. If so create required data on the production environment.
  • Thirdly, the plugin might be triggering but due to validations in the depth condition, it is moving out.
    • If any other plugin/workflow is triggering the plugin in context. If so handle the depth check condition properly
  • Lastly, some plugin configuration or coding condition check issues due to which it is not executing the required code portion.

2) If the plugin is immediately throwing an error the moment the action is taken, then the possible root cause for that might are mentioned below.

  • The error can occur due to plugin misconfiguration
  • Required Customizations/permissions are not present in Production/other environments to calling users.
  • Directly reading the EntityCollection.FirstOrDefault, without checking if the returned EntityCollection object is null or not.
  • Reading some configuration records, that are not yet created in Production/Other Instances Code logic/erroneous code issues.

Conclusion

Whenever you end up in such situations, then there are very high chances that you might have missed / improper plugin configuration on production. Which you can overcome by carefully observing the behavior of the plugin on the production environment.

At the same time, if you face such a situational interview question in your Dynamics 365 or CRM job interview then now you know to face it.

So, I hope that you might have found this article and video useful and learned some useful tips from it. If so then, kindly share this article with your friends and colleagues. Also, share your feedback and If you still have any doubt or confusion then please put them in the comments below.

Or if you feel that, I have missed some points that you have faced then we highly encourage you to share with us and our audience. I love to hear back from you and you can also share your feedback about this article as well.

So on that note, I take your leave and thank you for reading this article till the end. Hope to see you all in the next article till then bye bye and take a very good care of yourself and your friends and family.


No comments:

Post a Comment