locked
PostImageEntity in Plug in RRS feed

  • Question

  • When I change the owner of a record i would like to record the old user and new user values, in order to do so I am writing a plug-in but I get to see only PreImageEntity property with value but no value for post Image entity property.

    any clue what could be wrong?

    KV
    Thursday, January 21, 2010 9:57 AM

Answers

  • I mean that in Assign plugins in Context.InputProperties you can retrieve systemuser which will be new owner of a record after it reassigned. Check following code which describes how to retrieve new owner of a record:

    SecurityPrincipal userMoniker = (SecurityPrincipal)context.InputParameters["Assignee"];
    Guid userId = userMoniker.PrincipalId;
    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Thursday, January 21, 2010 10:51 AM
    Moderator

All replies

  • You can receive new owner identifier from plugin's context. You don't need postImage.

    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Thursday, January 21, 2010 10:02 AM
    Moderator
  • you mean Context.UserId? I think that gives you the logged-in user id and not the new user id. new assigned user can be any one.
    KV
    Thursday, January 21, 2010 10:39 AM
  • I mean that in Assign plugins in Context.InputProperties you can retrieve systemuser which will be new owner of a record after it reassigned. Check following code which describes how to retrieve new owner of a record:

    SecurityPrincipal userMoniker = (SecurityPrincipal)context.InputParameters["Assignee"];
    Guid userId = userMoniker.PrincipalId;
    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Thursday, January 21, 2010 10:51 AM
    Moderator