locked
unexpected error when trying to generate a tracking token? RRS feed

  • Question


  • Hello - I'm trying to generate a tracking token for a SendEmailRequest.  I'm using the following code but CRM is throwing an exception: "unexpected error occurred":

            private string GetTrackingToken(IOrganizationService service, string subject)
            {
                // Add Tracking Token to SendEmail Request
                GetTrackingTokenEmailRequest request = new GetTrackingTokenEmailRequest { Subject = subject };
                GetTrackingTokenEmailResponse response = null;
                response = (GetTrackingTokenEmailResponse)service.Execute(request);
                return response.TrackingToken;
            }

    Do you know why I might be getting the "unexpected error occurred" or how to debug/fix this?
    Friday, July 19, 2013 8:51 PM

All replies

  • Where does this code sit? Inside a plugin or some other custom application?

    Monday, July 22, 2013 8:37 PM