Access target entity in CRM 2013 ondemand workflow

Hi,
I have a custom workflow which is running on demand because of which i am not able to get the target entity using below line of code
Entity entity = (Entity)context.InputParameters["Target"];
What is the best way to get the target entity? Do we have to retrieve the entity using primaryEntityId from context?
Any help on this is appreciated.
Thanks.
Kruthi Hegde

Hello,
So normally on a Plugin you get the Target entity which essentially contains the parameters passed in the request message (say you're updating Country and Phone, those will be the fields contained within the request message - Target). Plus you always get
the Entity's Id.
In Custom workflow activities, regardless of whether they are triggered by a specific event or on-demand, you can get InArgument parameters (Input parameters) to pass fields to the wf context.
Or you could retrieve the Entity via the PrimaryEntityId, but I would not recommend returning the whole of ColumnSet as it is a best-practice to return only the fields you're looking to interact with.
Simple how to CWA MSDN
Hope that helps,

Similar Messages

  • Retrieve Company name from the Post in contact Entity - MS CRM 2013 online

    Hi All,
    We have a feature in the contact entity, on change of a field called call status we are triggering a workflow which will take the current value of the call status field and creates a new status in the Auto Post. So repeated calling and call status by Target
    marketing will be captured. 
    Below is the Sample
    Now the issue i am facing is creating a report out of it to capture # of calls and call status. 
    This is the sample report I've created. I am not able to Display the Account name in this report.
    Fetch XML used:
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="post">
        <attribute name="postid" />
        <attribute name="createdon" />
        <attribute name="createdby" />
        <attribute name="source" />
        <attribute name="modifiedon" />
        <attribute name="text" />
        <attribute name="regardingobjectid" />
        <attribute name="createdonbehalfby" />
      </entity>
    </fetch>
    Kindly suggest how this can be done.
    Regards, Rekha.J

    Hi Jithesh,
    Thanks for the reply.
    The above code retrieves no data and so no output is displayed, not even a  single record is retrieved.
    I previously had tried something similar to this , which retrieved the records but account name it was displaying some wrong data.
    Below is that code which I tried.
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
      <entity name="post">
        <attribute name="postid" />
        <attribute name="createdon" />
        <attribute name="createdby" />
        <attribute name="source" />
        <attribute name="modifiedon" />
        <attribute name="createdonbehalfby" />
        <attribute name="regardingobjectid" />
        <attribute name="text" />
        <link-entity name="systemuser" from="systemuserid" to="createdby" alias="ak">
          <link-entity name="account" from="createdby" to="systemuserid" alias="al">
            <attribute name="name" />
            <filter type="and">
              <condition attribute="name" operator="not-null" />
            </filter>
          </link-entity>
        </link-entity>
      </entity>
    </fetch>
    Regards, Rekha.J

  • How to create composite field in crm 2013

    Hi,
    I need 3 address fields in account entity in crm 2013 . By default 2 composite address fields are available i need 1 more composite address field. Can anyone tell me how to create custom composite address field like address1 and address2. Please guide me
    how can I meet that requirement.

    Hi Aamir,
    See if these links below helps you
    http://www.magnetismsolutions.co.nz/blog/paulnieuwelaar/2013/10/22/working-with-dynamics-crm-2013-composite-fields-fly-out-menu
    https://msdn.microsoft.com/en-in/library/dn481581.aspx?f=255&MSPPError=-2147217396
    Hope it helps!
    Regards, Abhishek Bakshi If you find this post helpful then please Vote as Helpful and Mark As Answer. Check my blog on https://mydynamicscrmblog.wordpress.com/

  • Issue with retrieveing the Manager of a System User in a Custom workflow - CRM 2013

    Issues with custom workflow activity in CRM 2013 On-prem
    I'm trying to pass the Manager of the System
    here is the code that I'm running, it gets to setting the MANAGER and stops
    I put the ran the FetchXML seperatly and it does return a value so I know what bit works
    public class CaseAccountManagerManagersLookup : CodeActivity
    // Inputs
    [Input("Enter Case")]
    [ReferenceTarget("incident")]
    public InArgument<EntityReference> CA { get; set; }
    // Outputs
    [Output("Manager Output")]
    [ReferenceTarget("systemuser")]
    public OutArgument<EntityReference> AMOUT { get; set; }
    protected override void Execute(CodeActivityContext executionContext)
    // Context
    IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
    IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
    IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
    //Create the tracing service
    ITracingService tracingService = executionContext.GetExtension<ITracingService>();
    // get the account and renewals manager ID's
    var CASE = CA.Get<EntityReference>(executionContext);
    tracingService.Trace("Case ID = " + CASE.Id);
    try
    // FETCH
    string fetchXml = string.Format(@"
    <fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
    <entity name='incident'>
    <attribute name='title' />
    <attribute name='incidentid' />
    <order attribute='title' descending='false' />
    <filter type='and'>
    <condition attribute='incidentid' operator='eq' value='{0}' />
    </filter>
    <link-entity name='contact' from='contactid' to='customerid' alias='ak'>
    <link-entity name='account' from='accountid' to='parentcustomerid' alias='al'>
    <link-entity name='systemuser' from='systemuserid' to='bc_dssalesperson' alias='am'>
    <attribute name='parentsystemuserid' />
    </link-entity>
    </link-entity>
    </link-entity>
    </entity>
    </fetch>", CASE.Id);
    EntityCollection case_results = service.RetrieveMultiple(new FetchExpression(fetchXml));
    //tracingService.Trace("fetch has run");
    if (case_results.Entities.Count != 0)
    foreach (var a in case_results.Entities)
    //if (a.Attributes.Contains("ai_parentsystemuserid"))
    tracingService.Trace("set manager id next");
    var MANAGERID = (EntityReference)a.Attributes["parentsystemuserid"];
    tracingService.Trace("manager id set");
    AMOUT.Set(executionContext, MANAGERID);
    throw new InvalidOperationException("Want to see trace");
    tracingService.Trace("end ");
    catch (Exception e)
    throw new InvalidPluginExecutionException("Plugin - CaseAccountManagerManagerLookup - " + e.Message);
    finally
    throw new InvalidOperationException("Want to see trace");
    Pete

    Hello,
    Try to use am.parentsystemuserid instead of just parentsystemuserid.
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • On demand workflow javascript crm 2013

    Hi
    I am struggling to make the on-demand workflow working in JavaScript in CRM 2013. Can you please help ?
    it was working fine in CRM 2011.
    Thanks for your help.

    Hi,
       There is no change. However here is the code snippet
    function RunWorkflow() {
    var _return = window.confirm('Are you want to execute workflow.');
    if (_return) {
    var url = Xrm.Page.context.getServerUrl();
    var entityId = Xrm.Page.data.entity.getId();
    var workflowId = '541B45C9-3F88-4448-9690-2D4A365C3172';
    var OrgServicePath = "/XRMServices/2011/Organization.svc/web";
    url = url + OrgServicePath;
    var request;
    request = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
    "<s:Body>" +
    "<Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">" +
    "<request i:type=\"b:ExecuteWorkflowRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\" xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">" +
    "<a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">" +
    "<a:KeyValuePairOfstringanyType>" +
    "<c:key>EntityId</c:key>" +
    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">" + entityId + "</c:value>" +
    "</a:KeyValuePairOfstringanyType>" +
    "<a:KeyValuePairOfstringanyType>" +
    "<c:key>WorkflowId</c:key>" +
    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">" + workflowId + "</c:value>" +
    "</a:KeyValuePairOfstringanyType>" +
    "</a:Parameters>" +
    "<a:RequestId i:nil=\"true\" />" +
    "<a:RequestName>ExecuteWorkflow</a:RequestName>" +
    "</request>" +
    "</Execute>" +
    "</s:Body>" +
    "</s:Envelope>";
    var req = new XMLHttpRequest();
    req.open("POST", url, true)
    // Responses will return XML. It isn't possible to return JSON.
    req.setRequestHeader("Accept", "application/xml, text/xml, */*");
    req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
    req.onreadystatechange = function () { assignResponse(req); };
    req.send(request);
    function assignResponse(req) {
    if (req.readyState == 4) {
    if (req.status == 200) {
    alert('successfully executed the workflow');
    Relevant links:
    http://www.mscrmconsultant.com/2013/03/execute-workflow-using-javascript-in.html
    https://community.dynamics.com/crm/f/117/t/143712.aspx
    Hope this helps.
    Minal Dahiya
    blog : http://minaldahiya.blogspot.com.au/
    If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

  • Getting an error as "Access denied" while writing the data into CRM 2013?

    Hi,
    I have written code in Script component Transformation to connect CRM 2013. I have used CRM 2013 SDK to connect it.
    #region
    Help:  Introduction to the Script Component
    /* The Script Component allows you to perform virtually any operation that can be accomplished in
    * a .Net application within the context of an Integration Services data flow.
    * Expand the other regions which have "Help" prefixes for examples of specific ways to use
    * Integration Services features within this script component. */
    #endregion
    #region
    Namespaces
    using
    System;
    using
    System.Data;
    using
    Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using
    Microsoft.SqlServer.Dts.Runtime.Wrapper;
    using
    Microsoft.Xrm.Sdk;
    using
    Microsoft.Xrm.Sdk.Query;
    using
    Microsoft.Xrm.Sdk.Client;
    using
    Microsoft.Xrm.Sdk.Messages;
    using
    System.ServiceModel;
    using
    System.ServiceModel.Description;
    #endregion
    [Microsoft.SqlServer.Dts.Pipeline.
    SSISScriptComponentEntryPointAttribute]
    public
    classScriptMain:
    UserComponent
    //This
    method is called once, before rows begin to be processed in the data flow.
    ///You
    can remove this method if you don't need to do anything here.
    IOrganizationServiceorganizationservice;   
    // Variables for the CRM webservice credentials
    // You could also declare them in the PreExecute
    // if you don't use it anywhere else
    stringCrmUrl =
    stringCrmDomainName =
    stringCrmUserName =
    stringCrmPassWord =
    publicoverridevoidPreExecute()
    base.PreExecute();
             * Add your code here
    CrmUrl =
    this.Variables.CrmWebservice.ToString();
            CrmDomainName =
    this.Variables.CrmDomainName.ToString();
            CrmUserName =
    this.Variables.CrmUserName.ToString();
            CrmPassWord =
    this.Variables.CrmPassWord.ToString();
    // Connect to webservice with credentials
    ClientCredentialscredentials =
    newClientCredentials();
            credentials.UserName.UserName =
    string.Format("{0}\\{1}",
    CrmDomainName, CrmUserName);//"[email protected]";
            credentials.UserName.Password = CrmPassWord;
            organizationservice =
    newOrganizationServiceProxy(newUri(CrmUrl),
    null, credentials,
    null);
    ///This
    method is called after all the rows have passed through this component.
    ///You
    can delete this method if you don't need to do anything here.
    //</summary>
    publicoverridevoidPostExecute()
    base.PostExecute();
             * Add your code here
    ///<summary>
    ///This
    method is called once for every row that passes through the component from Input0.
    //<param
    name="Row">The row that is currently passing through the component</param>
    publicoverridevoidInput0_ProcessInputRow(Input0BufferRow)
             * Add your code here
    EntityContact =
    newEntity("Contact");
       Contact["Employeeid"] = Row.EmpId;    
     if (!Row.Prefix_IsNull)
        Contact["MiddleName"] = Row.Prefix;
    organizationservice.Create(Contact);
    I was getting an error when the Create method is called from Organizationservice object and it is executing fine till that method. Could you please suggest me how to go further on this?
    Thanks &amp;amp; Regards, Anil

    Hi Anil, 
    You want to make sure you use lower case for both CRM entity and field names. 
    In any case, writing a custom script component to talk to CRM may not sound terribly hard, but as soon as you get more business requirements and you deal with more entities, you will find it is not something trivial.
    For this reason, we highly recommend you check out a commercial offering which will actually save you a lot of time and effort. Check out our solution at http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-crm/ for
    further details, we offer many integration features for Microsoft Dynamics CRM you can't find elsewhere, such as Upsert, Text Lookup, many-to-many relationship support, various writing actions, etc. 
    Disclaimer: I work for KingswaySoft
    Daniel Cai | http://danielcai.blogspot.com |
    @danielcai | Data Integration made easy with
    SSIS Integration Toolkit

  • Dynamic CRM 2013 Online how to execute Report, generate PDF and email

    Dear All,
    I am using Dynamic CRM 2013 online. For quote, I have workflow and Dialogue processes for review process. On approval, I want the system to generate a PDF of quote report, attach the PDF and email it to the Customer.
    Better I would like, When approver, clicks on the approve button, the system should auto generate a PDF of quote report, attach the PDF and email it to the Customer, without any further input from the user. If its not possible, I may have to put button on
    quote form.
    I am using the attached code, but facing various issues.
    1. Under prepare the SOAP Message coding part, I am not sure what should be the below URL for CRM 2013 Online?
    xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    2. What should be the emailid here? Is it Recepient Contact id(Guid) ?
    var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
    alert("emailid" + emailid.toString());
    3. Using this code, not able to create Entity for "ActivityMimeAttachment", I am getting newEntity as undefined.
    Below is the code I am using. Please check and help me out, where I am going wrong. Let me know if any better way to implement it. At present, I have put one button on quote form, on click event, below code will get executed.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script type="text/javascript">
    var Xrm;
    if (window.opener) { Xrm = window.opener.Xrm; }
    else if (window.parent) { Xrm = window.parent.Xrm; }
    function getReportingSession() {
    var reportName = "Quotation_Report"; //set this to the report you are trying to download
    var reportId = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
    var recordid = Xrm.Page.data.entity.getId();
    // recordid = recordid.substring(1, 37); //getting rid of curly brackets
    alert(recordid);
    var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
    var retrieveEntityReq = new XMLHttpRequest();
    retrieveEntityReq.open("POST", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    retrieveEntityReq.send("id=%7B" + reportId + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false");
    var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
    var ret = new Array();
    ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
    x = retrieveEntityReq.responseText.indexOf("ControlID=");
    ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
    return ret;
    function createEntity(ent, entName, upd) {
    var jsonEntity = JSON.stringify(ent);
    var createEntityReq = new XMLHttpRequest();
    var ODataPath = Xrm.Page.context.getServerUrl() + "XRMServices/2011/OrganizationData.svc";
    createEntityReq.open("POST", ODataPath + "/" + entName + "Set" + upd, false);
    createEntityReq.setRequestHeader("Accept", "application/json");
    createEntityReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    createEntityReq.send(jsonEntity);
    var newEntity = JSON.parse(createEntityReq.responseText).d;
    alert("new entity" + newEntity);
    return newEntity;
    function createAttachment() {
    var params = getReportingSession();
    var recordid = Xrm.Page.data.entity.getId();
    alert("recordid " + recordid);
    var orgName = Xrm.Page.context.getOrgUniqueName();
    var userID = Xrm.Page.context.getUserId();
    //create email record
    // Prepare the SOAP message.
    var xml = "<?xml version='1.0' encoding='utf-8'?>" +"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" +
    " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
    " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" +
    "<soap:Header>" +
    "</soap:Header>" +
    "<soap:Body>" +
    "<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>" +
    "<entity xsi:type='email'>" +
    "<regardingobjectid type='quote'>" + recordid + "</regardingobjectid>" +
    "<subject>" + "Email with Attachment4" + "</subject>" +
    "</entity>" +
    "</Create>" +
    "</soap:Body>" +
    "</soap:Envelope>";
    // Prepare the xmlHttpObject and send the request.
    var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
    xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    xHReq.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Create");
    xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xHReq.setRequestHeader("Content-Length", xml.length);
    xHReq.send(xml);
    // Capture the result
    var resultXml = xHReq.responseXML;
    // alert("resultXml " + resultXml);
    // Check for errors.
    var errorCount = resultXml.selectNodes('//error').length;
    if (errorCount != 0) {
    alert("ERROR");
    var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
    alert(msg);
    var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
    alert("emailid" + emailid.toString());
    //var emailid = userID;
    var post = Object();
    post.Body = encodePdf(params);
    var email = new Array();
    email[0] =new Object();
    email[0].id = emailid;
    email[0].entityType ='email';
    post.Subject ="File Attachment";
    post.AttachmentNumber = 1;
    post.FileName ="Report.pdf";
    post.MimeType ="application/pdf";
    post.ObjectId = Object();
    post.ObjectId.LogicalName ="email";
    post.ObjectId.Id = email[0].id;
    post.ObjectTypeCode ="email";
    alert(post.ObjectId.Id);
    createEntity(post,"ActivityMimeAttachment", "");
    alert("created successfully");
    email.Subject = "Your Order";
    //Set The current order as the Regarding object
    email.RegardingObjectId = {
    Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
    //Create Email Activity
    SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
    // Email Call Back function
    function EmailCallBack(result) {
    email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
    var activityPartyFrom = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyFrom.PartyId = {
    Id: customerId, // id of entity you want to associate this activity with.
    LogicalName: "contact"
    // Set the "activity" of the ActivityParty
    activityPartyFrom.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
    // Create the from ActivityParty for the email
    SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
    var activityPartyTo = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyTo.PartyId = {
    Id: ownerId, // id of entity you want to associate this activity with.
    LogicalName: "systemuser"
    // Set the "activity" of the ActivityParty
    activityPartyTo.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity). activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
    // Create the from ActivityParty
    SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
    //ActivityParty From Callback
    function ActivityPartyFromCallBack(result) {
    //ActivityParty To Callback
    function ActivityPartyToCallBack(result) {
    var StringMaker = function () {
    this.parts = [];
    this.length = 0;
    this.append = function (s) {
    this.parts.push(s);
    this.length += s.length;
    this.prepend = function (s) {
    this.parts.unshift(s);
    this.length += s.length;
    this.toString = function () {
    return this.parts.join('');
    var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    function encode64(input) {
    var output = new StringMaker();
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;
    while (i < input.length) {
    chr1 = input[i++];
    chr2 = input[i++];
    chr3 = input[i++];
    enc1 = chr1 >> 2;
    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
    enc4 = chr3 & 63;
    if (isNaN(chr2)) {
    enc3 = enc4 = 64;
    else if (isNaN(chr3)) {
    enc4 = 64;
    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
    return output.toString();
    var bdy = new Array();
    var bdyLen = 0;
    function concat2Bdy(x) {
    bdy[bdyLen] = x;
    bdyLen++;
    function encodePdf(params) {
    bdy = new Array();
    bdyLen = 0;
    var retrieveEntityReq = new XMLHttpRequest();
    var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] + "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] + "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
    retrieveEntityReq.open("GET", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.send();
    BinaryToArray(retrieveEntityReq.responseBody);
    return encode64(bdy);
    </SCRIPT>
    <SCRIPT type=text/vbscript>
    Function BinaryToArray(Binary)
    Dim i
    ReDim byteArray(LenB(Binary))
    For i = 1 To LenB(Binary)
    byteArray(i-1) = AscB(MidB(Binary, i, 1))
    concat2Bdy(AscB(MidB(Binary, i, 1)))
    Next
    BinaryToArray = byteArray
    End Function
    </SCRIPT>
    </head>
    <body>
    <input type="button" onclick="createAttachment();" value="Attach Report" />
    </body>
    </html>
    Thanks. and waiting for your valuable comments.
    - Mittal

    Hello,
    Yes, I was able to make my code working as below. Tested on CRM online 2013.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    <script type="text/javascript">
    if (typeof (SDK) == "undefined")
    { SDK = { __namespace: true }; }
    SDK.JScriptRESTDataOperations = {
    _context: function () {
    if (typeof GetGlobalContext != "undefined")
    { return GetGlobalContext(); }
    else {
    if (typeof Xrm != "undefined") {
    return Xrm.Page.context;
    else { return new Error("Context is not available."); }
    _getServerUrl: function () {
    var serverUrl = this._context().getServerUrl()
    if (serverUrl.match(/\/$/)) {
    serverUrl = serverUrl.substring(0, serverUrl.length - 1);
    return serverUrl;
    _ODataPath: function () {
    return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
    _errorHandler: function (req) {
    return new Error("Error : " +
    req.status + ": " +
    req.statusText + ": " +
    JSON.parse(req.responseText).error.message.value);
    _dateReviver: function (key, value) {
    var a;
    if (typeof value === 'string') {
    a = /Date\(([-+]?\d+)\)/.exec(value);
    if (a) {
    return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
    return value;
    Create: function (object, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 201) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send(JSON.stringify(object));
    Retrieve: function (id, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 200) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    Update: function (id, object, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("X-HTTP-Method", "MERGE");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 204 || this.status == 1223) {
    successCallback();
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send(JSON.stringify(object));
    Delete: function (id, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("X-HTTP-Method", "DELETE");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 204 || this.status == 1223) {
    successCallback();
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
    if (filter != null) {
    filter = "?" + filter;
    else { filter = ""; }
    var req = new XMLHttpRequest();
    req.open("GET", this._ODataPath() + type + "Set" + filter, true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 200) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    __namespace: true
    </script>
    <script type="text/javascript">
    //Create Email and link it with Order as Regarding field
    var Xrm;
    var email = new Object();
    var ownerID = "";
    var CustomerId = "";
    if (window.opener) { Xrm = window.opener.Xrm; }
    else if (window.parent) { Xrm = window.parent.Xrm; }
    //Get ownerid who send email of quotation to customer
    function GetOwnerID() {
    var owner = Xrm.Page.getAttribute("ownerid").getValue();
    ownerID = owner[0].id;
    var ownerName = owner[0].name;
    var entityType = owner[0].entityType;
    GetToEmailGUID();
    //Get customerid who receive email of quotation from owner
    function GetToEmailGUID() {
    var Customer = Xrm.Page.getAttribute('customerid').getValue();
    CustomerId = Customer[0].id;
    var CustomerName = Customer[0].name;
    var entityType = Customer[0].entityType;
    //if CustomerId is type of "Account" then get Primary Contact id of that account
    if (entityType == "account") {
    var contact = Xrm.Page.getAttribute("customerid").getValue();
    if (contact === null) return;
    var serverUrl = Xrm.Page.context.getClientUrl();
    var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
    var req = new XMLHttpRequest();
    req.open("GET", oDataSelect, false);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
    req.onreadystatechange = function () {
    if (req.readyState === 4) {
    if (req.status === 200) {
    var retrieved = JSON.parse(req.responseText).d;
    CustomerId = retrieved.PrimaryContactId.Id;
    else {
    alert(this.statusText);
    req.send();
    function CreateEmail() {
    GetOwnerID();
    email.Subject = "Email with Report Attachment";
    //Set The current order as the Regarding object
    email.RegardingObjectId = {
    Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
    //Create Email Activity
    SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
    // Email Call Back function
    function EmailCallBack(result) {
    email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
    var activityPartyFrom = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyFrom.PartyId = {
    Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
    LogicalName: "contact"
    // Set the "activity" of the ActivityParty
    activityPartyFrom.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
    // Create the from ActivityParty for the email
    SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
    var activityPartyTo = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyTo.PartyId = {
    Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
    LogicalName: "systemuser"
    // Set the "activity" of the ActivityParty
    activityPartyTo.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
    // Create the from ActivityParty
    SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
    //ActivityParty From Callback
    function ActivityPartyFromCallBack(result) {
    //ActivityParty To Callback
    function ActivityPartyToCallBack(result) {
    GetReportId('Quotation');
    //Create attachment for the created email
    function CreateEmailAttachment() {
    //get reporting session and use the params to convert a report in PDF
    var params = getReportingSession();
    //Email attachment parameters
    var activitymimeattachment = Object();
    activitymimeattachment.ObjectId = Object();
    activitymimeattachment.ObjectId.LogicalName = "email";
    activitymimeattachment.ObjectId.Id = email.ActivityId;
    activitymimeattachment.ObjectTypeCode = "email",
    activitymimeattachment.Subject = "File Attachment";
    activitymimeattachment.Body = encodePdf(params);
    activitymimeattachment.FileName = "Report.pdf";
    activitymimeattachment.MimeType = "application/pdf";
    //Attachment call
    SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
    //ActivityMimeAttachment CallBack function
    function ActivityMimeAttachmentCallBack(result) {
    var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
    var width = "800px";
    var height = "600px";
    window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
    // To open window which works in outlook and IE both
    //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width, height, features);
    //This method will get the reportId based on a report name that will be used in getReportingSession() function
    function GetReportId(reportName) {
    var oDataSetName = "ReportSet";
    var columns = "ReportId";
    var filter = "Name eq '" + reportName + "'";
    retrieveMultiple(oDataSetName, columns, filter, onSuccess);
    function retrieveMultiple(odataSetName, select, filter, successCallback) {
    var serverUrl = Xrm.Page.context.getServerUrl();
    var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
    var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
    if (select) {
    odataUri += "$select=" + select + "&";
    if (filter) {
    odataUri += "$filter=" + filter;
    $.ajax({
    type: "GET",
    contentType: "application/json; charset=utf-8",
    datatype: "json",
    url: odataUri,
    beforeSend: function (XMLHttpRequest) {
    XMLHttpRequest.setRequestHeader("Accept", "application/json");
    success: function (data) {
    if (successCallback) {
    if (data && data.d && data.d.results) {
    successCallback(data.d.results);
    else if (data && data.d) {
    successCallback(data.d);
    else {
    successCallback(data);
    error: function (XmlHttpRequest, errorThrown) {
    if (XmlHttpRequest && XmlHttpRequest.responseText) {
    alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
    function onSuccess(data) {
    reportId = data[0].ReportId.replace('{', ").replace('}', ");
    CreateEmailAttachment(); // Create Email Attachment
    //Gets the report contents
    function getReportingSession() {
    var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
    var retrieveEntityReq = new XMLHttpRequest();
    var Id = Xrm.Page.data.entity.getId();
    var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
    quotationGUID = quotationGUID.replace('}', "");
    var reportName = "Quotation"; //set this to the report you are trying to download
    var reportID = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
    var rptPathString = ""; //set this to the CRMF_Filtered parameter
    var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
    retrieveEntityReq.open("POST", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" +
    reportName + "&isScheduledReport=false&p:CRMAF_Filteredquote=" + strParameterXML;
    //remove the part starting from &p:salesorderid if your report has no parameters
    retrieveEntityReq.send(rptPathString);
    var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
    var ret = new Array();
    ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
    x = retrieveEntityReq.responseText.indexOf("ControlID=");
    ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
    return ret;
    var bdy = new Array();
    var bdyLen = 0;
    function concat2Bdy(x) {
    bdy[bdyLen] = x;
    bdyLen++;
    function encodePdf(params) {
    bdy = new Array();
    bdyLen = 0;
    var retrieveEntityReq = new XMLHttpRequest();
    var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
    "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
    "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
    retrieveEntityReq.open("GET", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.send();
    BinaryToArray(retrieveEntityReq.responseBody);
    return encode64(bdy);
    var StringMaker = function () {
    this.parts = [];
    this.length = 0;
    this.append = function (s) {
    this.parts.push(s);
    this.length += s.length;
    this.prepend = function (s) {
    this.parts.unshift(s);
    this.length += s.length;
    this.toString = function () {
    return this.parts.join('');
    var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    function encode64(input) {
    var output = new StringMaker();
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;
    while (i < input.length) {
    chr1 = input[i++];
    chr2 = input[i++];
    chr3 = input[i++];
    enc1 = chr1 >> 2;
    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
    enc4 = chr3 & 63;
    if (isNaN(chr2)) {
    enc3 = enc4 = 64;
    } else if (isNaN(chr3)) {
    enc4 = 64;
    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
    return output.toString();
    </script>
    <script type="text/vbscript">
    Function BinaryToArray(Binary)
    Dim i
    ReDim byteArray(LenB(Binary))
    For i = 1 To LenB(Binary)
    byteArray(i-1) = AscB(MidB(Binary, i, 1))
    concat2Bdy(AscB(MidB(Binary, i, 1)))
    Next
    BinaryToArray = byteArray
    End Function
    </script>
    </head>
    <body>
    <input type="button" onclick="CreateEmail();" value="Attach Report" />
    </body>
    </html>
    Thank you,
    Mittal.

  • CRM 2013 error when adding a new appointment in Outlook.

    When added
    NEW DEADLINE The outlook on the calendar, I received an
    error in CRM.
    /////ERROR//////////////////////////////////////////////////////////////////////////////////////////
    [2015-03-05 09:20:34.403] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread:   28 |Category: Exception |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | CrmException..ctor 
    ilOffset = 0x7
     at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)  ilOffset = 0x7
     at CrmException..ctor(String message, Int32 errorCode)  ilOffset = 0x5
     at SecurityLibrary.RetrievePrivilegeForUser(IUser user, Guid privilege, ExecutionContext context)  ilOffset = 0x14B
     at SecurityLibrary.TryCheckPrivilege(Guid user, Guid privilege, ExecutionContext context)  ilOffset = 0x3D
     at SecurityLibrary.TryCheckPrivilege(SecurityPrincipal principal, Guid privilege, ExecutionContext context)  ilOffset = 0x42
     at SecurityLibrary.CheckPrivilege(SecurityPrincipal principal, Guid privilege, ExecutionContext context)  ilOffset = 0x0
     at AddressManager.GetOwnerCandidate(AddressEntry addressEntry)  ilOffset = 0x50
     at AddressResolver.BuildResolvedAddressEntry(AddressCategory category, BusinessEntity businessEntity, Guid& objectId, Boolean active, String emailAddressMatched)  ilOffset = 0x58
     at AddressResolver.GetPrunedList(BusinessEntityCollection responseCollection, AddressCategory category, Hashtable removeDuplicateFilter)  ilOffset = 0x6B
     at AddressResolver.DoResolve(AddressEntry[] addressEntriesToResolve, Int32[] objectTypes, Boolean matchPartialEmailAddresses)  ilOffset = 0x70
     at AddressManager.ResolveEmailAddressInternalHelper(String emailAddresses, Int32[] objectTypeCodes)  ilOffset = 0x1F
     at CommunicationActivityServiceBase.ResolveUnresolvedParties(BusinessEntityCollection parties, Int32[] objectTypes, ExecutionContext context)  ilOffset = 0x5C
     at AppointmentService.Book(BusinessEntity entity, ExecutionContext context)  ilOffset = 0x3D
     at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)  ilOffset = 0xFFFFFFFF
     at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)  ilOffset = 0x25
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  ilOffset = 0xCF
     at LogicalMethodInfo.Invoke(Object target, Object[] values)  ilOffset = 0x4F
     at InternalOperationPlugin.Execute(IServiceProvider serviceProvider)  ilOffset = 0x57
     at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)  ilOffset = 0x200
     at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x65
     at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0x6C
     at MessageProcessor.Execute(PipelineExecutionContext context)  ilOffset = 0x1C5
     at InternalMessageDispatcher.Execute(PipelineExecutionContext context)  ilOffset = 0xE4
     at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode,
    ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)  ilOffset = 0x16E
     at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean
    returnResponse, Boolean checkAdminMode)  ilOffset = 0x1F1
     at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x2D
     at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x26
     at OrganizationSdkService.Execute(OrganizationRequest request)  ilOffset = 0xD
     at   ilOffset = 0xFFFFFFFF
     at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)  ilOffset = 0x241
     at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)  ilOffset = 0x100
     at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)  ilOffset = 0x48
     at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
     at Wrapper.Resume(Boolean& alreadyResumedNoLock)  ilOffset = 0x1B
     at ThreadBehavior.SynchronizationContextStartCallback(Object state)  ilOffset = 0x0
     at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x70
     at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x4
     at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()  ilOffset = 0x0
     at ThreadPoolWorkQueue.Dispatch()  ilOffset = 0xA3
    >Crm Exception: Message: SecLib::RetrievePrivilegeForUser failed - no roles are assigned to user. Returned hr = -2147209463, User: ed2ef8c8-69db-e311-9816-0019990163cf, ErrorCode: -2147209463
    [2015-03-05 09:20:34.572] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread:   28 |Category: Platform.Sdk |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | VersionedPluginProxyStepBase.Execute 
    ilOffset = 0x65
    >Web Service Plug-in failed in SdkMessageProcessingStepId: {E4C9BB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: appointment; Stage: 30; MessageName: Book; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=6.0.0.0,
    Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
       at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
       at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
       at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    Inner Exception: System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    0 (0x0000) is an invalid culture identifier.
       at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
       at System.Globalization.CultureInfo..ctor(Int32 culture)
       at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
       at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
    [2015-03-05 09:20:34.579] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread:   28 |Category: Exception |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | CrmException..ctor 
    ilOffset = 0x7
     at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)  ilOffset = 0x7
     at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments)  ilOffset = 0xB
     at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x65
     at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0x6C
     at MessageProcessor.Execute(PipelineExecutionContext context)  ilOffset = 0x1C5
     at InternalMessageDispatcher.Execute(PipelineExecutionContext context)  ilOffset = 0xE4
     at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode,
    ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)  ilOffset = 0x16E
     at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean
    returnResponse, Boolean checkAdminMode)  ilOffset = 0x1F1
     at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x2D
     at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x26
     at OrganizationSdkService.Execute(OrganizationRequest request)  ilOffset = 0xD
     at   ilOffset = 0xFFFFFFFF
     at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)  ilOffset = 0x241
     at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)  ilOffset = 0x100
     at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)  ilOffset = 0x48
     at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
     at Wrapper.Resume(Boolean& alreadyResumedNoLock)  ilOffset = 0x1B
     at ThreadBehavior.SynchronizationContextStartCallback(Object state)  ilOffset = 0x0
     at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x70
     at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x4
     at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()  ilOffset = 0x0
     at ThreadPoolWorkQueue.Dispatch()  ilOffset = 0xA3
    >Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    0 (0x0000) is an invalid culture identifier.
       at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
       at System.Globalization.CultureInfo..ctor(Int32 culture)
       at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
       at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
    [2015-03-05 09:20:34.580] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread:   28 |Category: Platform |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | MessageProcessor.Execute 
    ilOffset = 0x1C5
    >MessageProcessor fail to process message 'Book' for 'appointment'.
    [2015-03-05 09:20:34.581] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   28 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | ExceptionConverter.ConvertToFault 
    ilOffset = 0x69
    >UNEXPECTED: no fault?
    [2015-03-05 09:20:34.582] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   28 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | ExceptionConverter.ConvertMessageAndErrorCode 
    ilOffset = 0x23B
    >System.Globalization.CultureNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #895E889A: System.Globalization.CultureNotFoundException: Culture is not supported.
    >Parameter name: culture
    >0 (0x0000) is an invalid culture identifier.
    >   at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
    >   at System.Globalization.CultureInfo..ctor(Int32 culture)
    >   at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
    >   at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
    /////END  ERROR//////////////////////////////////////////////////////////////////////////////////////////
    And then the
    date of the duplicates in the calendar
    in Outlook and CRM.
    My version CRM 2013 -
    6.1.2.112
    Crm2013wasthemigratedfromthe
    2011 version.  
    Does anyone have any idea how to
    solve it.

    I checked it, these errors
    occur on all users. Below
    the main errors that occur.
    Crm Exception: Message: SecLib::RetrievePrivilegeForUser failed - no roles are assigned to user. Returned hr = -2147209463, User: ed2ef8c8-69db-e311-9816-0019990163cf, ErrorCode: -2147209463
    Web Service Plug-in failed in SdkMessageProcessingStepId: {E4C9BB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: appointment; Stage: 30; MessageName: Book; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=6.0.0.0,
    Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
    Inner Exception: System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    0 (0x0000) is an invalid culture identifier.
    Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    0 (0x0000) is an invalid culture identifier.
    MessageProcessor fail to process message 'Book' for 'appointment'.
    System.Globalization.CultureNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #895E889A: System.Globalization.CultureNotFoundException: Culture is not supported.
    >Parameter name: culture
    >0 (0x0000) is an invalid culture identifier.

  • Dynamically Populated Option Sets in CRM 2013

    Hello,
    In my solution, I have an entity with an option set attribute that has no option values by default. A script in the entity form handles the population of the option set dropdown via .addOption. The displayed value of the attribute shows blank or "--"
    (for CRM 2013). The expected behavior is that when the user selects an item in the dropdown, the field value changes and then displays the selected value. Another attribute (single line of text) then gets that value for later use. This works just fine in CRM
    2011.
    However, in CRM 2013, selecting a value in the dropdown does not change the displayed value of the field. Putting focus again on the dropdown shows that the default value (blank) is selected (or nothing is selected).
    I tried to modify the field value using Xrm.Page/Entity and even JQuery directly on elements to at least to display the selected text, change some attributes, etc. None of this works. It should be noted that when attaching a "change" handler in
    JQuery to the dropdown, it fires. When specifying a change handler for the field in the form properties, it does not fire.
    I have another idea involving creating a workflow that runs periodically or another server process/plugin to dynamically populate a global option set, and then point my entity's option set attribute to that option set. If you're wondering why a workflow,
    the attribute is supposed to be a list of all existing entity names in the current default solution. If for some reason entities are added/removed from the solution, my option set needs to be brought up-to-date.
    Before going down this road, I'm wondering if any of you have encountered this and how you got around it.
    Thanks!

    Hello Mahender
    As Rod mentioned in his query, the option set attribute is supposed to be a list of all existing entity names in the current CRM organization . If for some reason entities are added/removed from the organization, the option set needs to be updated.
    Hence we created a blank option set attribute. Now, OnLoad of the form, we populate the option set using .addOption() method. This populates the option set, but on selection change, attribute's OnChange() is not getting triggered and also, the selected value
    is not visible on form.
    Below is an example of what we are trying to achieve
    http://www.powerobjects.com/blog/2012/01/25/microsoft-dynamics-crm-and-dynamic-option-sets/
    I hope I am able to explain my query in detail here.
    Any help is appreciated.
    Thanks,
    Bhavika Patel

  • CRM 4.0 Plugin to CRM 2013

    I am newbie in CRM and just while I starting CRM customization we are upgrading from CRM 4.0 to CRM 2013. I must customize some plugin to CRM 2013 but I have difficulty to understand CRM 4.0 coding. Please can any CRM angel help me.
    Here I attach a snip from long coding where I have difficulty to understand.
    First one:  CRM 4.0 Coding
    try {
    TargetCreateDynamic tcd = new TargetCreateDynamic();
    CreateRequest createRequest = new CreateRequest();
    tcd.Entity = seminarprodukt;
    createRequest.Target = tcd;
    Response bla = cs.Execute(createRequest);
    My coding for this snip:
    try
    TargetCreateDynamic tcd = new TargetCreateDynamic();
    CreateRequest createRequest = new CreateRequest();
    Entity entityToCreate = new Entity("seminarproduct");
    createRequest.Target = entityToCreate;//tcd;
    CreateEntityResponse response = (CreateEntityResponse)service.Execute(createRequest);
    Second one:
    else if (context.PostEntityImages.Contains("Vorlage")) { //sem_vorlage
    try {
    Log("Neue Vorlage!");
    DynamicEntity vorlage = (DynamicEntity)context.PostEntityImages["Vorlage"];
    // DynamicEntity[] produkte = new DynamicEntity[4];
    product[] produkte = new product[4];
    Lookup einheit = new Lookup();
    einheit.Value = new Guid("8BC61AB9-9C7B-40DE-92EA-400D2D2D723C");
    einheit.type = EntityName.uom.ToString();
    einheit.name = "Primäre Einheit";
    //Einheitengruppe 14716F64-B23E-48D8-91D6-3A5959CE9A80
    Lookup einheitgruppe = new Lookup();
    einheitgruppe.Value = new Guid("14716F64-B23E-48D8-91D6-3A5959CE9A80");
    einheitgruppe.type = EntityName.uomschedule.ToString();
    einheitgruppe.name = "Standardeinheit";
    Picklist produkttyp = new Picklist();
    produkttyp.Value = 2;
    produkttyp.name = "Verschiedenes";
    Lookup e = new Lookup();
    e.type = EntityName.transactioncurrency.ToString();
    e.name = "Euro";
    e.Value = new Guid("09E73F71-0DE5-E011-B6A9-00155D06D300");
    Lookup chf = new Lookup();
    chf.type = EntityName.transactioncurrency.ToString();
    chf.name = "Schweizer Franken";
    chf.Value = new Guid("77C0C210-65EE-E011-98DF-00155D06D300");
    Lookup epl = new Lookup();
    epl.name = "Euro";
    epl.Value = new Guid("42998222-C995-E111-82D3-00155D06D300");
    epl.type = EntityName.pricelevel.ToString();
    Lookup chfpl = new Lookup();
    chfpl.name = "Schweiz";
    chfpl.Value = new Guid("8467A214-C995-E111-82D3-00155D06D300");
    chfpl.type = EntityName.pricelevel.ToString();
    for (int i = 0; i < produkte.Length; i++) {
    produkte[i] = new product();
    produkte[i].quantitydecimal = new CrmNumber(2);
    produkte[i].producttypecode = produkttyp;
    produkte[i].defaultuomscheduleid = einheitgruppe;
    produkte[i].defaultuomid = einheit;
    My Coding for this snip:
    else if (context.PostEntityImages.Contains("Vorlage"))
    //sem_vorlage
    try
    Log("Neue Vorlage!");
    Entity vorlage = (Entity)context.PostEntityImages["Vorlage"];
    //Entity[] produkte = new Entity[4];
    product[] produkte = new product[4];
    EntityReference einheit = new EntityReference();
    einheit.Id = new Guid("8BC61AB9-9C7B-40DE-92EA-400D2D2D723C");
    //einheit.Name = EntityName.uom.ToString();
    einheit.LogicalName = "Primäre Einheit";
    //Einheitengruppe 14716F64-B23E-48D8-91D6-3A5959CE9A80
    EntityReference einheitgruppe = new EntityReference();
    einheitgruppe.Id = new Guid("14716F64-B23E-48D8-91D6-3A5959CE9A80");
    einheitgruppe.Name = "uomschedule".ToString(); //????? Name = Type???
    einheitgruppe.LogicalName = "Standardeinheit";
    OptionSetValue produkttyp = new OptionSetValue();
    produkttyp.Value = 2;
    // produkttyp //.name = "Verschiedenes";
    EntityReference e = new EntityReference(); //Währung in Product
    e.Name ="transactioncurrency".ToString();
    e.LogicalName = "Euro";
    e.Id = new Guid("09E73F71-0DE5-E011-B6A9-00155D06D300");
    EntityReference chf = new EntityReference();
    chf.Name = "transactioncurrency".ToString();
    chf.LogicalName = "Schweizer Franken";
    chf.Id = new Guid("77C0C210-65EE-E011-98DF-00155D06D300");
    EntityReference epl = new EntityReference();
    epl.LogicalName = "Euro";
    epl.Id = new Guid("42998222-C995-E111-82D3-00155D06D300");
    epl.Name = "pricelevel".ToString();
    EntityReference chfpl = new EntityReference();
    chfpl.LogicalName = "Schweiz";
    chfpl.Id = new Guid("8467A214-C995-E111-82D3-00155D06D300");
    chfpl.Name = "pricelevel".ToString();
    for (int i = 0; i < produkte.Length; i++)
    produkte[i] = new product();
    produkte[i].quantitydecimal = new CrmNumber(2);
    produkte[i].producttypecode = produkttyp;
    produkte[i].defaultuomscheduleid = einheitgruppe;
    produkte[i].defaultuomid = einheit;
    The row as bold selected  I did not understand. Can any one help me how I can customize or is there other wrong customize coding. Thanks a lot for your time and advice.

    Hello,
    To understand what the code means I would suggest to recheck SDK for CRM 4.0 (it is still available online!).
    TargetCreateDynamic
    product
    Dynamics CRM MVP/ Technical Evangelist at SlickData LLC
    My blog

  • CRM 2013 - Inconsistent javascript issue crash the web client and user needs to reopen

    Hello,
    We are using CRM 2013 on premise version and almost 600 users are using it. We have some inconsistent JavaScript issue (following is the log for same) which happens to users in a day or two. When this issue occurs user can not work in system and they have
    to open new instance of CRM.
    Does anybody knows about this error?
    <CrmScriptErrorReport>
      <ReportVersion>1.0</ReportVersion>
      <ScriptErrorDetails>
       <Message>Unable to get property 'location' of undefined or null reference</Message>
       <Line>1</Line>
       <URL>/_static/_common/scripts/main.js?ver=1676323357</URL>
       <PageURL>/main.aspx#313155368</PageURL>
       <Function>anonymous($p0,$p1,$p2){this.$3_3.get_currentIFrame()&&Mscrm.PerformanceTracing.write("Unload",this.$3_3.get_currentIFrame().src);this.$H_3=$p0.toString();this.$26_3();this.$1A_3();this.$1J_3();if($p0.get_isLocalServer())$p0.get_query()["pagemode"]="iframe</Function>
       <CallStack>
        <Function>anonymous($p0,$p1,$p2){this.$3_3.get_currentIFrame()&&Mscrm.PerformanceTracing.write("Unload",this.$3_3.get_currentIFrame().src);this.$H_3=$p0.toString();this.$26_3();this.$1A_3();this.$1J_3();if($p0.get_isLocalServer())$p0.get_query()["pagemode"]="iframe";addPassiveAuthParameters($p0);var$v_0=$p0.toString();if(IsNull($p2))$p2=false;var$v_1=this.$18_3($p0,$p2);if($v_1){if(this.$2z_3()){window.location.reload();return}this.$2d_3();this.$1s_3();Mscrm.PerformanceTracing.write("Navigate",$v_0);!Mscrm.Utilities.isIE()&&this.raiseEvent(Mscrm.ScriptEvents.UpdateTopLocation,null);this.$3_3.get_currentIFrame().contentWindow.location.replace($v_0)}else{this.$10_3();var$v_2=this.get_contentWindow().Sys.Application.findComponent("crmPageManager");if($v_2){!Mscrm.Utilities.isIE()&&$v_2.raiseEvent(Mscrm.ScriptEvents.UpdateTopLocation,null);var$v_3={};$v_3["sourceUri"]=Mscrm.Utilities.getContentUrl(null);$v_2.raiseEvent(Mscrm.ScriptEvents.IFrameReactivated,$v_3)}}window.self.InnerIFrameSrcChangeTimestamp=(newDate).getTime();this.title=$p1;if(window.LOCID_UI_DIR==="RTL"&&$p0.toString().indexOf("PersonalWall")>=0&&window.UseTabletExperience)this.$3_3.get_currentIFrame().style.position="RELATIVE"}</Function>
       </CallStack>
      </ScriptErrorDetails>
      <ClientInformation>
       <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)</BrowserUserAgent>
       <BrowserLanguage>en-US</BrowserLanguage>
       <SystemLanguage>en-US</SystemLanguage>
       <UserLanguage>en-US</UserLanguage>
       <ScreenResolution>1366x768</ScreenResolution>
       <ClientName>Web</ClientName>
       <ClientTime>2015-04-20T15:41:12</ClientTime>
      </ClientInformation>
      <ServerInformation>
        <OrgLanguage>1033</OrgLanguage>
        <OrgCulture>1033</OrgCulture>
        <UserLanguage>1033</UserLanguage>
        <UserCulture>1033</UserCulture>
        <OrgID>{E8BBA7AE-A552-DE11-B475-001E0B4882E2}</OrgID>
        <UserID>{614837CD-448B-DE11-A5E1-005056970D6C}</UserID>
        <CRMVersion>6.1.2.112</CRMVersion>
      </ServerInformation>
    </CrmScriptErrorReport>

    Are you on-premise, or on-line? : It's on-premise
    Can you reproduce it on-demand, or is it sporadic?: It's sporadic
    There is a mention of loading an iFrame in the error, do you have iFrames on the form that generates this error?
    It's not on specific forms, so can't identify that. Yes we have iframes on some forms.
    Does it happen on any/all entity forms, or specific ones?  Do the entity forms have any custom JavaScript on them?
    It's not on specific forms. And yes we have javascript on almost all forms.
    Do you have any network problems or slowness in your network? Does the problem happen when the network is busy?
    We need to check this on next occurrence.
    Do the users that see this error have any unusual add-ins or toolbars in their browser?  This is not for specific user. Its happening for all randomly.
    Have you tried other browsers like Chrome or FireFox and do users see the problem there as well?
    We need to check only for IE.

  • CRM 2013 - "Save and Close" button behavnig like "Save and New"

    Hi,
    I am working in CRM 2013. I have a scenario in which I am saving new opportunity product record through javascript and preventing original save of CRM. Save is working fine. After save, I need to refresh the screen. So I have used "Xrm.Utility.openEntityForm"
    to open newly created item in edit mode. When I click on "Save and Close" button on this new form in edit mode, instead of closing the opportunity product screen, it opens new entity form. So in short, after saving the record, if I click on "Save
    and Close", it behaves like "Save and New".
    Any one facing such issue?

    Save & Close seems to behave like the Save & "Back" Button, so the form tries to return to the new form, that was opened before.
    But I have no solution for this behavior...

  • App-V CRM 2013 Outlook Client and Office 2013 Click to Run

    Hi,
    I'm trying to get going with enbing the CRM 2013 for Outlook client with the VL version of Office Pro Plus 2013.  I have successfully published and use Office App-V package in a test environment.  App-V version 5.0 SP2 is installed on the client
    PC (Windows 7 64bit).  SCCM 2012 R2 is used to publish APP-V applications to user groups.
    I have sequenced the CRM 2013 Outlook client (offline mode disabled) with UR2 and published it using SCCM as a "Add-on or Plug-in.  I've also created a connection group so that the App-V version of Office 2013 is able to connect to the sequenced
    CRM client.  The client installs successfully, but the CRM tab doesn't appear in the Outlook Ribbon, and the Configuration Wizard crashes each time it is launched.  The App-V event log is blank (which I'm taking to be a good sign).  All CRM
    client prerequisites have been preinstalled on the target PC.
    I'm thinking that the CRM client can't see the Outlook application and therefore crashes and doesn't integrate with the Outlook application.  Problem Signature 09 (from the crash explanation) states "System.NullReference Exception".
    I can't seem to find much out there for sequencing the 2013 version of the client.  Has any else managed this yet or have any ideas where I'm going wrong?
    Thanks,
    Tim

    Hello,
    I would use Process Monitor to understand what happens and to see why Outlook isn't seeing the plugin, and why the wizard is crashing
    Nicke Källén | The Knack| Twitter:
    @Znackattack

  • BIDSExtensionsSetup.dll error while installing CRM 2013 authoring

    Been having this trouble for a month, and have found no solution on MSDN.
    I have SQL Data Tools 2010 installed.
    Cannot proceed instalation after getting this error:
    Setup cannot continue because C:\Users\[My User]\AppData\Local\Temp\MSCRM_{GUID}\BIDSExtensionsSetup.dll cannot be found or is incorrect.
    For additional details see logfile:
    21:26:13|   Info| === Setup bootstrap logging started 02/02/2015 09:26:13 p.m. ===
    21:26:13|   Info| Bootstrap version: 7.0.0.3027.
    21:26:14|   Info| User: [My User].
    21:26:14|   Info| Invoked with command line: "C:\Users\[My User]\Downloads\SetupBIDSExtensions.exe" 
    21:26:14|   Info| Running C:\Users\[My User]\Downloads\SetupBIDSExtensions.exe
    21:26:14|   Info| Loading bootstrap library C:\Users\[My User]\Downloads\BIDSExtensionsSetup.dll
    21:26:35|   Info| Microsoft Dynamics® CRM Report Authoring Extension is not currently installed.
    21:26:37|   Info| Closing bootstrap library C:\Users\[My User]\Downloads\BIDSExtensionsSetup.dll
    21:26:38|   Info| Patchfile target Product code: {0C524DF0-0409-0060-BF3E-80D80B490D53}
    21:26:38|   Info| Patchfile target version: 6.0.0000.0302
    21:26:38|   Info| Patchfile target language: 1033
    21:26:38|   Info| Patchfile target upgrade code: {3315FF72-9F24-423B-B854-7EDCF3394F50}
    21:26:38|  Error| Patch file is not valid for installing package. (packagevalidator.cpp:CWindowsInstallerPatchPackageValidator::Validate:364).
    21:26:38|   Info| Expected parameters for update file: 
    Upgrade code - {3315FF72-9F24-423B-B854-7EDCF3394F50}
    Product code - {0C524DF0-0409-0070-BF3E-80D80B490D53}
    ProductLanguage - 1033
    BaseVersion - 7.0.0.3027
    21:26:39|   Info| Error not a valid MSP file - C:\Users\[My User]\Downloads\Update\Bids_KB2888948_i386_1033.msp
    21:26:39|  Error| The update file is not valid for installation of this application. (setup.cpp:CCrmSetup::RetrieveUpdateFilePath:1184).
    21:26:39|   Info| Clean up the BITS downloader.
    21:32:50|  Error| The update file is not valid for installation of this application., Error, OK
    21:32:50|   Info| InputResult: OK
    21:33:07|   Info| Uninitializing COM.
    21:33:08|   Info| Uninitialized COM.
    21:33:08|   Info| Clean up the BITS downloader.
    21:33:08|   Info| === Setup bootstrap logging ended 02/02/2015 09:33:08 p.m. ===
    21:33:10|   Info| === Setup bootstrap logging started 02/02/2015 09:33:10 p.m. ===
    21:33:10|   Info| Bootstrap version: 6.0.0.302.
    21:33:10|   Info| User: [My User].
    21:33:11|   Info| Invoked with command line: "C:\Users\[My User]\Downloads\crm2013\SetupBIDSExtensions.exe" 
    21:33:11|   Info| Running C:\Users\[My User]\Downloads\crm2013\SetupBIDSExtensions.exe
    21:33:11|   Info| Loading bootstrap library C:\Users\[My User]\Downloads\crm2013\BIDSExtensionsSetup.dll
    21:33:15|   Info| Microsoft Dynamics® CRM Report Authoring Extension is not currently installed.
    21:33:16|   Info| Closing bootstrap library C:\Users\[My User]\Downloads\crm2013\BIDSExtensionsSetup.dll
    21:33:17|   Info| Patchfile target Product code: {0C524DF0-0409-0060-BF3E-80D80B490D53}
    21:33:17|   Info| Patchfile target version: 6.0.0000.0302
    21:33:18|   Info| Patchfile target language: 1033
    21:33:18|   Info| Patchfile target upgrade code: {3315FF72-9F24-423B-B854-7EDCF3394F50}
    21:33:30|   Info| Patchfile passed validation checks.
    21:33:30|   Info| MSP file C:\Users\[My User]\Downloads\crm2013\Update\Bids_KB2888948_i386_1033.msp will be installed
    21:33:31|   Info| Searching for MU Service in system
    21:33:32|   Info| MU service found in system.
    21:33:32|   Info| MU is registered with AU
    21:33:32|   Info| MU Service registration status = Registered
    21:33:35|   Info| Do not update Radio clicked -- proceeding with setup without update
    21:33:36|   Info| Do not update Radio clicked -- proceeding with setup without update
    21:33:37|   Info| Copying installer files to local directory:  
    21:33:37|   Info| Package: C:\Users\[My User]\Downloads\crm2013\BIDSExtensions.msi, Options: ADDLOCAL="Installer" INSTALLDIR="C:\Users\[My User]\AppData\Local\Temp\MSCRM_{7BCE165E-AEEC-4323-802B-E609A072076C}" TARGETDIR="C:\Users\[My
    User]\AppData\Local\Temp\MSCRM_{7BCE165E-AEEC-4323-802B-E609A072076C}" ALLOWRUN=1 PATCH="C:\Users\[My User]\Downloads\crm2013\Update\Bids_KB2888948_i386_1033.msp"
    21:34:07|   Info| Loading bootstrap library C:\Users\[My User]\AppData\Local\Temp\MSCRM_{7BCE165E-AEEC-4323-802B-E609A072076C}\BIDSExtensionsSetup.dll
    21:34:08|  Error| LoadLibrary(C:\Users\[My User]\AppData\Local\Temp\MSCRM_{7BCE165E-AEEC-4323-802B-E609A072076C}\BIDSExtensionsSetup.dll) failed.(error = 5) (bootstrapwrapper.h:CBootstrapLibrary::Load:80).
    21:34:08|  Error| Setup cannot proceed because C:\Users\[My User]\AppData\Local\Temp\MSCRM_{7BCE165E-AEEC-4323-802B-E609A072076C}\BIDSExtensionsSetup.dll cannot be found or is incorrect. (bootstrapwrapper.h:CBootstrapLibrary::Load:116).
    21:36:02|  Error| Setup cannot proceed because C:\Users\[My User]\AppData\Local\Temp\MSCRM_{7BCE165E-AEEC-4323-802B-E609A072076C}\BIDSExtensionsSetup.dll cannot be found or is incorrect., Error, OK
    21:36:02|   Info| InputResult: OK
    21:36:05|   Info| Are you sure you want to cancel Setup?, Question, Yes|No
    21:36:05|   Info| InputResult: Yes
    21:36:06|   Info| Clean up the BITS downloader.
    21:36:06|   Info| Uninitializing COM.
    21:36:06|   Info| Uninitialized COM.
    21:36:07|   Info| Clean up the BITS downloader.
    21:36:07|   Info| === Setup bootstrap logging ended 02/02/2015 09:36:07 p.m. ===

    The Report Authoring Extensions (any version) don't support VS 2013. Currently the Crm 2015 Report Authoring Extensions support VS 2012 and VS 2010, and the Crm 2013 Report Authoring Extensions supports only VS 2010.
    By the way, the error you posted suggests you're trying to install the Crm 2011 Report Authoring Extensions
    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

  • Issue in sharepoint 2013 designer workflow kickoff

    We are facing issues in sharepoint 2013 designer workflow kickoff. When we kick off custom designer workflow using AD user with contribute/approve access, sendemail from task does not send an email. When we kickoff using administrator account task in
    the designer workflow sends an email. There seems to be multiple issues with kickoff. and it even does not give any error task gets created but send email does not work.
    Another issue in another approach-
    We are also not able to kickoff using one AD account which we are not login in everyday. If we kickoff using this account after 2/3 days kickoff says invalid state of object for that user. Once we login manually with that admin workflow kick off account
    again kick off starts. We do not want to let current user kickoff the workflow. 
    In both cases we are using new AD import in sp2013 and sync is done every 5 minutes.
    MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint Lead

    May be a permission issue, see whether the contributor  has enough permission to participate in the workflow.
    Also try to set Design permission to test and see whether that works.
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if the reply helps you

Maybe you are looking for

  • Web search box not working

    I have the latest version of Firefox for my MacBook Pro. It was working fine up until a couple months ago. I've always used the web search box as a quick way to find what I was looking for. Now, if I type in anything in the web search box (far right

  • IPhoto 11 duplicates events after import

    I have tried numerous times to import my photo collection into iPhoto 11, once import is complete all events are duplicated. Any ideas on how to fix this ?

  • SYS.ANYDATA; and Global_Name

    How to use SYS.ANYDATA? I thought it is a data type that can store any type of data? I created a table with an id column and a column with sys.anydata data type; then insert into that table with values of user-defined data type. It failed. What's the

  • E4200 - Slow connection speed

    hi cisco linksys : i live in singapore i sign uop a plan of 100mbps(optical fiber) and bought a router E4200....my qur=estion is how come i get about 60-70mpbs instead ...

  • [SOLVED] Kernel freezes at boot

    I build a custom kernel from Linus's source tree on github. I followed all the steps to install the kernel, but when it boots into the new kernel, it completely freezes when it attempts to load the initial ramdisk. Here's my grub configuration GRUB_D