CRM 2013: Adding Attachment to Posts

Hello,
I am cresting a new entity will serve the following purpose
a) Save the internal conversations (with attachment)
b) Save conversation between the  agent and customer (with attachment)
Now for "a" - I can use the "Notes".
for "b" - I would like use the posts - but there are 2 problems
I) I can not add an attachment
II) The character limitation of 1000
Could anyone kindly advise of ways (configuration or code) to resolve the 2 problems?
Thanks,
Hasib

Hello Andrii,
I am not sure if your reply got chopped off. But as I mentioned I am already creating a custom entity - that is not my problem. My problem is for posts
I) I can not add an attachment
II) The character limitation of 1000
Could anyone kindly advise of ways (configuration or code) to resolve the 2 problems?
Thanks,
Hasib

Similar Messages

  • Duplicate posts on personal wall in MS CRM 2013

    Hi, 
    We are currently facing a strange issue on a recent MS CRM 2013 deployment. Every post gets repeated on the user's personal wall. i.e. if a user enters a phone call, the wall displays 2 identical posts regarding the activity.What could be the reason and
    how can it be resolved?
    Thanks
    Rinish R

    Hello rinish,
    if i understand your problem well, i'd say Rocky answered the question here:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/78560d28-6e50-4ab6-a337-8ab5ed92403a/duplicate-wall-posts-when-creating-accounts?forum=crm
    Go into Default solution, click on SDK Message Processing Steps (in the left column) and disable duplicate steps.
    Worked for my organization.
    Best regards

  • MS CRM 2015 Adding Custom RIbbon button in dashboard and Changing Colors

    Hi,
    I am Looking for customization in MS Dynamics CRM 2015 and want to Add Custom Ribbon button in dashboard and Changing Colors of that ribbon using customization.xml i am new to crm 2015 and only know how to import export solutions.
    Regards
    Irfan

    Hello Irfan,
    For adding a custom button please refer this blog
    https://community.dynamics.com/crm/b/aeonnexuscrm/archive/2014/10/21/ms-crm-2013-adding-custom-ribbon-button-in-dashboard.aspx
    And for changing colors in Chart
    https://crmchartguy.wordpress.com/2012/08/23/palette-custom-colors-in-charts/
    Hope this 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/

  • 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.

  • Javascript errors while adding attachment to list on ribbon sp 2013

    Hi All,
    Javascript errors while adding attachment to list sp 2013
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.3)
    Timestamp: Mon, 20 Oct 2014 09:49:13 UTC
    Message: Object required
    Line: 1
    Char: 122565
    Code: 0
    URI:
    https://server.com/_layouts/15/form.js?rev=PxBF2F2E04Ut1YUooXDAbg%3D%3D
    Screen become blank and nothing is dosplayed  when attach item is clicked for custom list
    Ravi

    Hi Ravi,
    According to your description, my understanding is that you encountered the error "Object required" when you try to add attachment to list in SharePoint 2013.
    For your issue, you can refer to the blog:
    http://kiran-kakanur.blogspot.com/2010/02/how-to-resolve-object-required-error-in.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Adding Custom report url or short-cut to Command bar - CRM 2013

    Hello all,
    I would like to add short-cut to one of our custom report in Account Screen near [Run report] action button.
    Is this possible and how? any third party tool?
    Current version is MS CRM 2013.
    hussain

    Yes, Ribbon workbench is one of tool can be used for this..
    https://www.develop1.net/public/Download%20Ribbon%20Workbench%202013.aspx
    https://ribbonworkbench.uservoice.com/knowledgebase/articles/71374-1-getting-started-with-the-ribbon-workbench
    MayankP
    My Blog
    Follow Me on Twitter

  • 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.

  • 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

  • Dynamics CRM 2013 : Offline capability with Outlook Plugin

    Dear all,
    I have a scenario where I have to use the Offline Capability feature of Dynamics CRM 2013 with CRM Client for Outlook plugins.
    Can I use the offline capability mode if all my users are using gmail as their email?
    If so, can someone guide me please.
    Your help would be greatly appreciated.
    Many Thanks & regards
    Vinay

    You need to change page size in order to see the on button. try Ctrl+0
    Regards Faisal
    Thanks Faisal for your reply. I tried Ctrl+0 (zero) but no difference. I think Ctrl+0 is for clearing the zoom in/out effect in web pages. While this tool is a windows (desktop) application.
    Please note that I have taken the snap (attached in original post) after maximizing the
    Update Assembly dialog (by double clicking the title bar area.
    The version of the Plugin Registration Tool is 6.1.1.1143 64bit. If you can check your Plugin Registration Tool version and post the snapshot as well?
    blog: http://technologynotesforyou.wordpress.com | skype: ali.net.pk

  • CRM 2013 - Quote product inline edit view - No editable unit price?

    In CRM 2011, my customer was able to add products to a quote and still edit the price per unit for the selected product.
    Doing this, the default price per unit was NOT affected on the product card itself.
    This was a good functionality since their prices change every day, so their default price per unit on a product is € 1.
    When creating a quote, they'd just enter the price per unit, per product, real time.
    The good thing about CRM 2013 is that they can add products easy with the new grid.
    First problem is, when adding a product and clicking on the find button, CRM shows only 10 products??
    There are over 100 products in CRM, so they have to scroll down and then click on 'search more records'..
    Too much clicking!
    But the main problem is that they can't edit the price per unit anymore, on the quote itself, for the selected product:
    The product grid is awesome: quick & easy to add products, but we need to be able to change the price per unit.
    Even when we use the form 'products', we can't edit the price per unit anymore.
    Is there a way to fix this?
    I went looking in the field list of quoteproducts, there's a field names price per unit.
    The description says it's meant to edit the price per unit, but we can't edit it anywhere but on the product card itself..
    What am I overlooking?
    *edit*
    I found this this thread:
    https://community.dynamics.com/crm/f/117/p/123743/264373.aspx
    Where they post a link to this:
    http://www.magnetismsolutions.com/blog/colinmaitland/2012/10/08/pricing_products_part_11_override_pricing_privileges
    That was, fyi, how it worked in CRM 2011, they could override the price...
    Now, I can't find a form where I can change the price per unit :/
    Not on the new grid, and not on the quote products form.

    Hi,
    Doesn't anyone have a solution for the above? This is a real problem for several customers of ours. We know how to "fix" this by putting a price of 1 EUR and then changing the quantity, but that is stupid to say the least. 

  • Error while installing the Microsoft Dynamics CRM 2013 Report Authoring Extension set up

    HI Experts,
    I am trying to install Report Authoring extension tool to work with MS CRM 2015 online reports but unable to install, getting below error even though I am having VS 2013, SQL Server 2014 and Data tools for VS 2013 installed on my machine.
    Please help me to fix this issue.
    When I double click the error getting below error.
    Error : Business Intelligence Development Studio is not installed for Microsoft SQL Server Reporting Services.
    When I click the details , getting below error.
    Thanks
    Baji Rahaman

    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

  • 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

  • Best practice for developing with CRM 2013 (On Premises)

    Hello all.  I'm just starting to work with CRM, and I have some questions that hopefully will be simple for the seasoned developers.  It's mostly just some best practice or general how-to questions for the group.
    - When creating a new Visual Studio CRM Project I can connect to my CRM Instance and create new WebResources which deploy to the CRM instance just fine, but how can I pull all the existing items that are in the CRM Solution into the Visual Studio CRM project?
     Or do I need to export the solution to a ZIP, expand it with SolutionPackager.exe, then copy these into my Visual Studio project to get it into sync?
    - When multiple developers are working on changes is it best to keep everything in a Visual Studio project as I mentioned above, or is it better for everyone to have their own instance of CRM to code with so they can Export/Import solutions as needed then
    these solutions be manually merged before moving into a common Test/QA environment?
    - When modifying the submenu on a CRM form is it suggested to use Ribbon Workbench or is it better/easier to just export the solution, expand it with SolutionPackager.exe,  modify ribbondiff and anything else required for the change, package it
    back up, then reimport to CRM?  I've heard from some that Ribbon Workbench has some limitations, but being green I wasn't sure what those limitations might be or if it'd be best to just manually make these changes.  Or is thre any way to have a copy
    of ribbondiff in Visual Studio and deploy this without having to repackage the Solution and Import in the ZIP?
    I think that's it for now :)  Thanks for any advise or suggestions.  I really want to start learning the in's and out's of CRM and how all the pieces fit together.  Also can someone direct me to some documentation or books that might give
    more insight on developing for CRM 2013 or 2015 (moving to this soon)?
    Thanks for your time.

    Hi Sam
    Also interested in best practice around this area - especially recommended development routes, unit testing, continuous integration etc - it would be great if you posted here if you find any good articles etc. At the moment we tend to just push changes
    onto a live system as and when appropriate and I'd prefer to move away from that...
    Thanks
    Stuart

  • CRM 2013 Opening salesorder record results in blank page

    I am using CRM 2013 on-premise and I'm having an issue viewing Order records. I can see the list of Active Orders, but when I click an Order record to open it, I get a blank page.
    I have tried the following to fix this:
    Cleared my cookies and cache
    Navigated to another Org under the same URL
    IIS reset on the web site
    Full server reboot
    I have found several posts saying this is a known bug in CRM 2013 and the "fixes" were the items listed above. Has anyone else run into this issue and not been able to resolve using the aforementioned work-arounds?
    I also get an additional error when I try to navigate away from the blank page:
    Microsoft Dynamics CRM Error Report Contents
    <CrmScriptErrorReport>
      <ReportVersion>1.0</ReportVersion>
      <ScriptErrorDetails>
       <Message>Unable to get value of the property 'ClientVariables': object is null or undefined</Message>
       <Line>2</Line>
       <URL>/_common/JsProvider.ashx?ids=1959345455-451858892-1713948411-1401263868-1250882489-367493978-19173614-574022791-696891199-2007586035-1552783829&ver=1250620516</URL>
       <PageURL>/main.aspx?etc=1088&extraqs=%3f_gridType%3d1088%26etc%3d1088%26id%3d%257b8029E1FC-4FB8-E411-9406-00155D106900%257d%26rskey%3d706276367&pagemode=iframe&pagetype=entityrecord&rskey=706276367</PageURL>
       <Function>anonymous(){returnthis.get_$L_0().ClientVariables}</Function>
       <CallStack>
        <Function>anonymous(){returnthis.get_$L_0().ClientVariables}</Function>
       </CallStack>
      </ScriptErrorDetails>
      <ClientInformation>
       <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.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; BRI/2; MS-RTC LM 8; InfoPath.3)</BrowserUserAgent>
       <BrowserLanguage>en-us</BrowserLanguage>
       <SystemLanguage>en-us</SystemLanguage>
       <UserLanguage>en-us</UserLanguage>
       <ScreenResolution>1920x1200</ScreenResolution>
       <ClientName>Web</ClientName>
       <ClientTime>2015-03-30T12:47:28</ClientTime>
      </ClientInformation>
      <ServerInformation>
        <OrgLanguage>1033</OrgLanguage>
        <OrgCulture>1033</OrgCulture>
        <UserLanguage>1033</UserLanguage>
        <UserCulture>1033</UserCulture>
        <OrgID>{0E1EFE15-0471-E411-93FE-00155D106900}</OrgID>
        <UserID>{15167AD7-C474-E411-93FE-00155D106900}</UserID>
        <CRMVersion>6.1.0.581</CRMVersion>
      </ServerInformation>
    </CrmScriptErrorReport>

    wilson5301 wrote:
     When he tries to open up a PDF, Internet explorer will open a new blank window.
    Open a PDF from where:
    saved locally on the computer?
    from an online link?
    If from an online link, I have seen the same before.  This usually occurs if the server where the document is located is very slow.  Retrying (F5) usually resolves the problem.
    P.S. the latest secure version of Reader 7x is 7.1.4!

  • Error in "APPROVE EMAIL" of Users in CRM 2013.

    Hi, 
    I have created users in my OOTB On-premise organization of MS CRM 2013. Getting below error while approving email of Users:
    There are encrypted fields in the organization database, but the data encryption feature isn't activated. Contact your Microsoft Dynamics CRM system administrator to activate data encryption. To activate, go to Systems Settings > Data Management > Data
    Encryption. For more information, see http://go.microsoft.com/fwlink/?LinkId=316366
    I tried to activate Data Encryption from Data Management(as mentioned in this error), then getting below error:
    Error
    The HTTPS protocol is required for this type of request. Enable the HTTPS protocol and try again. For more information, see the Post-Installation and Configuration instructions.
    Please help.
    Thanks.
    Regards, Devendra V.

    Please refer to this post from Magnetism,
    http://www.magnetismsolutions.com/blog/paulnieuwelaar/2014/10/08/data-encryption-errors-after-restoring-microsoft-dynamics-crm-database
    It definitely resolves the issue.

Maybe you are looking for

  • Error message of MAC flapping for CCM-UC installed in UCS server

    Dear All, I have a strange issue, I have the 2 UCS servers setup with CCM & unity Connection running on each server on PUB - SUB mode. I'm getting following error message on the Switch where the UCS server Connects. I'm unable to trace why we are get

  • [solved] How to type a degree symbol?

    In Windows, it's Alt+0176.  Is there something similar to this that will type a degree symbol? Last edited by synthead (2008-05-31 07:29:51)

  • Xpath expression in condition editor

    Hi Expert Forum ! I have an xml structure like this : <aaa>   <bbb>     <ccc>     </ccc>   </bbb> </aaa> In my condition editor (receiver determination) I want to refer to an element which is a child of node <ccc>. However, node ccc is not defined in

  • Problem importing packages via ICE??

    Hello, I am running Portal 6.0 on Windows Server. For one of the business package that is to be implemented in my Portal, i have to deploy two files as a pre-requisite that are associated with SAP Note 660777(https://service.sap.com/sap/support/notes

  • I am not able to view all the text in my chatpter/scene selections buttons.

    I created chapters in iMovie. However, when I create the DVD in iDVD6, the chapter text gets cut off. I tried to decrease the font size, but that didn't work. It did make the text smaller, but it was still cut off (just smaller). Does anyone know how