Sending email with From as a Queue to which the user does not have permission RRS feed

  • Question

  • Hello Experts,

    I am looking for design suggestions for a design problem that we are facing in CRM 2011.  We are using Case entity and the records are team-owned.  When a Case is created, we add it to a Queue and the owner of the Queue is the team to which the user belongs.  The Case will be owned by the team to which the user belongs.  We have a custom Queue lookup on the Case entity which is called Outbound Queue.  Now, when the user wants to send an outgoing email, the From of the email should be a Queue that is selected in the Outbound Queue field which might be different than the queue to which the Case was added.  This Outbound Queue is also owned by a team to which the user may or may not be part of.  The Outbound Queue also might have records added to it, which users belonging to different teams should not be able to see, so we cannot add a user to two teams.

    Now, let’s consider the scenario where an user is not part of the team which owns the Outbound Queue, but the user ought to send the email with From as this Outbound Queue.  So, we came up with an idea to grant the user access (sharing) to the Outbound Queue record pre-send of the email (pre-operation) and revoke access after the email is sent (post-operation).  We have registered a plugin on pre and post-operations of the Email entity Send message to achieve this.

    This works perfectly as expected, but we figured out a problem later related to auditing.  We have audit enabled on the Queue L.  So, this is creating audit records for each share and unshare of the Queue record with the user.  Now, for each outgoing email two audit records are created.

    We do not want this to happen.  Is there any way this can be avoided in a supported way or is there any other design I can use to work around this problem?

    Please suggest me some ideas as I am not able to come up with any other design idea.

    Thanks in advance for your help.


    Sunday, November 24, 2013 5:24 PM