locked
Plugin Help! RRS feed

  • Question

  • I would like to Create a plugin to the following

    1- get the Current User Name
    2- Send An email to the current User

    How can i do this???
    hussain
    Friday, December 4, 2009 8:52 PM

Answers

  • Hi, Hussain.

    You can use context.CallerId to retrieve identifier of user which invoke create/update operation.
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Marked as answer by Hussain Saffar Saturday, December 5, 2009 11:26 AM
    Saturday, December 5, 2009 7:10 AM
    Moderator

All replies

  • Well, the user id comes in on the context.  For the email I use the SMTPClient class.

    But why do you need a plug-in?  There is already an existing Workflow Activity to send an email.  Have you ruled out an event driven workflow rule?
    Friday, December 4, 2009 10:21 PM
  • I got a custom entity that going to trigger an email to the team leader of that salesperson after creating/saving new record!

    is there anyway to identify the current user???


    hussain
    Friday, December 4, 2009 11:19 PM
  • Hi, Hussain.

    You can use context.CallerId to retrieve identifier of user which invoke create/update operation.
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Marked as answer by Hussain Saffar Saturday, December 5, 2009 11:26 AM
    Saturday, December 5, 2009 7:10 AM
    Moderator