locked
change ownership of custom entity in crm 4 workflow RRS feed

  • Question

  • How do i change the owner of custom entity in a crm 4 workflow?  im getting stuck when i try and do the targetowned
     'update owner
                        Dim NewOwner As SecurityPrincipal = New SecurityPrincipal
                        NewOwner.PrincipalId = New Guid(AssignToOwner)
                        NewOwner.Type = SecurityPrincipalType.User
    
    'what do i do here
                        Dim CustomEntityTarget As TargetOwned = New TargetOwned
                        CustomEntityTarget.EntityId = New Guid(CustomEntityID)
    
                        Dim AssignOwner As AssignRequest = New AssignRequest
                        AssignOwner.Assignee = NewOwner
                        AssignOwner.Target = CustomEntityTarget
    
                        Dim AssignResponse As AssignResponse = CType(crmService.Execute(AssignOwner), AssignResponse)
                        'end reassign
    

    • Edited by T Bonz Thursday, June 11, 2009 8:40 PM
    Thursday, June 11, 2009 8:34 PM

Answers

All replies